Skip to content

Commit

Permalink
Dynamically generate navigation (#973)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmarkus authored and pekura committed Nov 19, 2019
1 parent 8e08d9f commit 9908960
Show file tree
Hide file tree
Showing 45 changed files with 483 additions and 2,702 deletions.
15 changes: 15 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!-- meta
{
"node": {
"label": "Overview",
"category": {
"label": "Basics"
},
"metaData": {
"categoryPosition": 1,
"position": 0
}
}
}
meta -->

# Luigi Documentation

If you are new to Luigi, read the [Getting started guide](getting-started.md) to learn more about its structure and key features.
Expand Down
42 changes: 15 additions & 27 deletions docs/application-setup.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!-- meta
{
"node": {
"label": "Installation",
"category": {
"label": "Luigi Core"
},
"metaData": {
"categoryPosition": 2,
"position": 0
}
}
}
meta -->

# Application setup

Prior to start developing with Luigi, you need to set up your application. This document shows you how to set up a web application using the Luigi micro frontend framework.
Expand Down Expand Up @@ -48,32 +63,19 @@ or execute these commands manually to get the same result:

```bash
mkdir my-new-app && cd my-new-app

npm init -y

sed 's/"scripts": {/"scripts": {\
\ "buildConfig":"webpack --entry .\/src\/luigi-config\/basic\/basicConfiguration.js -o .\/public\/assets\/sampleconfig.js --mode production",/1' package.json > p.tmp.json && mv p.tmp.json package.json

npm i -save @kyma-project/luigi-core @kyma-project/luigi-client fiori-fundamentals webpack webpack-cli @babel/core @babel/preset-env babel-loader

mkdir -p public/assets

mkdir -p src/luigi-config/basic

curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-sample-angular/src/index.html > public/index.html

curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-sample-angular/src/assets/sampleexternal.html > public/assets/basicexternal.html

curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-sample-angular/src/luigi-config/basic/basicConfiguration.js > src/luigi-config/basic/basicConfiguration.js

sed "s|extendedConfiguration.bundle.js|sampleconfig.js|g" public/index.html > public/index.tmp.html && mv public/index.tmp.html public/index.html

cp -r node_modules/\@kyma-project/luigi-* public

cp -r node_modules/fiori-fundamentals/dist public/fiori-fundamentals

npm run buildConfig

live-server --entry-file=index.html public
```

Expand All @@ -93,33 +95,19 @@ bash <(curl -s https://raw.githubusercontent.com/SAP/luigi/master/scripts/setup/
or execute these commands manually to get the same result:
```bash
ng new my-angular-app --routing && cd my-angular-app

npm i -P @kyma-project/luigi-core @kyma-project/luigi-client fiori-fundamentals webpack webpack-cli @babel/core @babel/preset-env babel-loader

sed 's/"scripts": {/"scripts": {\
\ "buildConfig":"webpack --entry .\/src\/luigi-config\/basic\/basicConfiguration.js -o .\/src\/assets\/sampleconfig.js --mode production",/1' package.json > p.tmp.json && mv p.tmp.json package.json

mkdir -p src/luigi-config/basic

mv src/index.html src/angular.html

curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-sample-angular/src/index.html > src/index.html

curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-sample-angular/src/luigi-config/basic/basicConfiguration.js > src/luigi-config/basic/basicConfiguration.js

curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-sample-angular/src/assets/sampleexternal.html > src/assets/basicexternal.html


sed 's/extendedConfiguration.bundle.js/sampleconfig.js/g' src/index.html > src/index.tmp.html && mv src/index.tmp.html src/index.html

sed 's#"src/index.html"#"src/angular.html"#g' angular.json > tmp.json && mv tmp.json angular.json

sed 's#"src/styles.css"#"src/styles.css", "node_modules/fiori-fundamentals/dist/fiori-fundamentals.min.css"#g' angular.json > tmp.json && mv tmp.json angular.json

sed 's#"src/assets"#"src/assets","src/index.html","src/logout.html",{"glob": "fiori-fundamentals.min.css","input": "node_modules/fiori-fundamentals/dist","output": "/fiori-fundamentals"},{"glob": "fonts/**","input": "node_modules/fiori-fundamentals/dist","output": "/fiori-fundamentals"},{"glob": "SAP-icons.*","input": "node_modules/fiori-fundamentals/dist","output": "/fiori-fundamentals"},{"glob": "**","input": "node_modules/@kyma-project/luigi-core","output": "/luigi-core"},{"glob": "luigi-client.js","input": "node_modules/@kyma-project/luigi-client","output": "/luigi-client"}#g' angular.json > tmp.json && mv tmp.json angular.json

npm run buildConfig

npm run start
```

Expand Down
15 changes: 15 additions & 0 deletions docs/authorization-configuration.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!-- meta
{
"node": {
"label": "Authorization",
"category": {
"label": "Luigi Core"
},
"metaData": {
"categoryPosition": 2,
"position": 4
}
}
}
meta -->

# Authorization configuration

To configure authorization in Luigi, go to the `auth:` section of your project's `basicConfiguration.js` file. To see how authorization works, you can also go to the [Luigi Fiddle](https://fiddle.luigi-project.io) site and configure a sample application.
Expand Down
15 changes: 15 additions & 0 deletions docs/authorization-events.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!-- meta
{
"node": {
"label": "Authorization events",
"category": {
"label": "Luigi Core"
},
"metaData": {
"categoryPosition": 2,
"position": 5
}
}
}
meta -->

# Authorization events

>**NOTE:** For learning and testing purposes, use the [Luigi Fiddle](https://fiddle.luigi-project.io) page where you can configure a sample Luigi application.
Expand Down
15 changes: 15 additions & 0 deletions docs/communication.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!-- meta
{
"node": {
"label": "Custom messages",
"category": {
"label": "Advanced"
},
"metaData": {
"categoryPosition": 4,
"position": 0
}
}
}
meta -->

# Communication

>**NOTE:** For learning and testing purposes, use the [Luigi Fiddle](https://fiddle.luigi-project.io) page where you can configure a sample Luigi application.
Expand Down
15 changes: 15 additions & 0 deletions docs/general-settings.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!-- meta
{
"node": {
"label": "General settings",
"category": {
"label": "Luigi Core"
},
"metaData": {
"categoryPosition": 2,
"position": 6
}
}
}
meta -->

# General settings

<!-- add-attribute:class:success -->
Expand Down
15 changes: 15 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!-- meta
{
"node": {
"label": "Getting started",
"category": {
"label": "Basics"
},
"metaData": {
"categoryPosition": 1,
"position": 1
}
}
}
meta -->

# Getting started

## What is Luigi?
Expand Down
15 changes: 15 additions & 0 deletions docs/lifecycle-hooks.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!-- meta
{
"node": {
"label": "Lifecycle hooks",
"category": {
"label": "Luigi Core"
},
"metaData": {
"categoryPosition": 2,
"position": 7
}
}
}
meta -->

# Lifecycle hooks

You can use any of the Luigi lifecycle hooks by adding additional setup to the root of the Luigi configuration object. Here is an example:
Expand Down
17 changes: 17 additions & 0 deletions docs/luigi-architecture.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
<!-- meta
{
"node": {
"label": "Architecture",
"category": {
"label": "Basics"
},
"metaData": {
"categoryPosition": 1,
"position": 2
}
}
}
meta -->

# Luigi Architecture

This diagram represents an overview of Luigi's architecture. It shows the relationship between the Luigi framework, the web application, and the external micro frontends and authorization providers:

![Architecture](assets/architecture.png)
15 changes: 15 additions & 0 deletions docs/luigi-client-api.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!-- meta
{
"node": {
"label": "API",
"category": {
"label": "Luigi Client"
},
"metaData": {
"categoryPosition": 3,
"position": 1
}
}
}
meta -->

# Luigi Client API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
Expand Down
15 changes: 15 additions & 0 deletions docs/luigi-client-setup.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!-- meta
{
"node": {
"label": "Installation",
"category": {
"label": "Luigi Client"
},
"metaData": {
"categoryPosition": 3,
"position": 0
}
}
}
meta -->

# Luigi Client Installation

Luigi Client contains a library that allows your application to use all features of the Luigi framework.
Expand Down
15 changes: 15 additions & 0 deletions docs/luigi-core-api.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!-- meta
{
"node": {
"label": "API",
"category": {
"label": "Luigi Core"
},
"metaData": {
"categoryPosition": 2,
"position": 9
}
}
}
meta -->

# Luigi Core API

## Luigi Config
Expand Down
15 changes: 15 additions & 0 deletions docs/luigi-ux-features.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!-- meta
{
"node": {
"label": "UI features",
"category": {
"label": "Luigi Core"
},
"metaData": {
"categoryPosition": 2,
"position": 8
}
}
}
meta -->


# Luigi UX features

Expand Down
15 changes: 15 additions & 0 deletions docs/navigation-advanced.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!-- meta
{
"node": {
"label": "Advanced navigation",
"category": {
"label": "Luigi Core"
},
"metaData": {
"categoryPosition": 2,
"position": 2
}
}
}
meta -->

# Advanced navigation

This document shows you how to configure the following Luigi features:
Expand Down
16 changes: 16 additions & 0 deletions docs/navigation-configuration-example.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
<!-- meta
{
"node": {
"label": "Configuration Example",
"category": {
"label": "Luigi Core"
},
"metaData": {
"categoryPosition": 2,
"position": 10
},
"hideFromNav": true
}
}
meta -->

# Navigation configuration example

This example represents a sample Luigi navigation configuration including parameters described in the [navigation parameters reference](navigation-parameters-reference.md).
Expand Down
15 changes: 15 additions & 0 deletions docs/navigation-configuration.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!-- meta
{
"node": {
"label": "Basic navigation",
"category": {
"label": "Luigi Core"
},
"metaData": {
"categoryPosition": 2,
"position": 1
}
}
}
meta -->

# Basic navigation configuration

Read these guides to get started with configuring your navigation:
Expand Down
15 changes: 15 additions & 0 deletions docs/navigation-parameters-reference.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!-- meta
{
"node": {
"label": "Routing",
"category": {
"label": "Luigi Core"
},
"metaData": {
"categoryPosition": 2,
"position": 3
}
}
}
meta -->

# Navigation parameters reference

<!-- add-attribute:class:success -->
Expand Down
Loading

0 comments on commit 9908960

Please sign in to comment.