Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation for examples + consolidate filenames #1099

Merged
merged 25 commits into from
Mar 4, 2020
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3211733
consolidating filenames and folders
alexandra-simeonova Feb 12, 2020
99547e6
luigi-config consistency
alexandra-simeonova Feb 13, 2020
17205c0
include examples in docu
alexandra-simeonova Feb 13, 2020
a36cf17
update getting-started.md
alexandra-simeonova Feb 13, 2020
367cbec
update getting-started.md
alexandra-simeonova Feb 14, 2020
a671e49
Merge branch 'master' into examples-docu
zarkosimic Feb 14, 2020
68e5db7
Merge branch 'master' into examples-docu
zarkosimic Feb 17, 2020
fb78eb1
Merge branch 'master' into examples-docu
maxmarkus Feb 18, 2020
eeeffbb
Merge branch 'master' into examples-docu
maxmarkus Feb 19, 2020
58454b5
remove folder mention
alexandra-simeonova Feb 19, 2020
5d2e10c
Apply suggestions from code review
maxmarkus Feb 19, 2020
149cd08
Merge branch 'master' into examples-docu
alexandra-simeonova Feb 20, 2020
7aec7c8
e2e link
alexandra-simeonova Feb 21, 2020
b346dd4
Update docs/application-setup.md
alexandra-simeonova Feb 25, 2020
1ece6a4
Update docs/application-setup.md
alexandra-simeonova Feb 25, 2020
55299b0
Update docs/getting-started.md
alexandra-simeonova Feb 25, 2020
821fa74
Update docs/application-setup.md
alexandra-simeonova Feb 25, 2020
6399132
Update docs/application-setup.md
alexandra-simeonova Feb 25, 2020
d2d74a6
Update docs/application-setup.md
alexandra-simeonova Feb 25, 2020
455d51a
empty commit
alexandra-simeonova Feb 25, 2020
8df6d4e
Merge branch 'master' into examples-docu
alexandra-simeonova Mar 3, 2020
b2a6d47
Merge branch 'examples-docu' of github.com:alexandra-simeonova/luigi …
maxmarkus Mar 4, 2020
5552421
script updates to not have luigi-config folders but just files
maxmarkus Mar 4, 2020
4aac730
more script fixes and optimizations
maxmarkus Mar 4, 2020
09b871c
reflect script changes in md file
alexandra-simeonova Mar 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/application-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ live-server --entry-file=index.html public
```
<!-- accordion:end -->

3. Open the folder where Luigi is installed. Navigate to the `src/luigi-config` directory. The JavaScript file(s) in this folder can be used to configure Luigi [navigation](navigation-configuration.md), [authorization](authorization-configuration.md), [general settings](general-setting.md) and more.
3. Open the directory where Luigi is installed. Search for the `luigi-config.js` file which can be used to configure Luigi [navigation](navigation-configuration.md), [authorization](authorization-configuration.md), [general settings](general-setting.md) and more.

## Application setup for Angular 6

Expand Down Expand Up @@ -104,7 +104,7 @@ npm run start
```
<!-- accordion:end -->

3. Open the folder where Luigi is installed. Navigate to the `src/luigi-config` directory. The JavaScript file(s) in this folder can be used to configure Luigi [navigation](navigation-configuration.md), [authorization](authorization-configuration.md), [general settings](general-setting.md) and more.
3. Open the directory where Luigi is installed. Search for the `luigi-config.js` file which can be used to configure Luigi [navigation](navigation-configuration.md), [authorization](authorization-configuration.md), [general settings](general-setting.md) and more.

## Application setup for SAPUI5/OpenUI5

Expand Down Expand Up @@ -141,7 +141,7 @@ $ live-server --entry-file=index.html public
```
<!-- accordion:end -->

3. Open the folder where Luigi is installed. Navigate to the `public/assets` directory. The JavaScript file(s) in this folder can be used to configure Luigi [navigation](navigation-configuration.md), [authorization](authorization-configuration.md), [general settings](general-setting.md) and more.
3. Open the directory where Luigi is installed. Search for the `luigi-config.js` file which can be used to configure Luigi [navigation](navigation-configuration.md), [authorization](authorization-configuration.md), [general settings](general-setting.md) and more.


## Application setup for VUE.JS
Expand Down Expand Up @@ -177,7 +177,7 @@ $ npm run serve
```
<!-- accordion:end -->

3. Open the folder where Luigi is installed. Navigate to the `my-original-vue-app/public/assets` directory. The JavaScript file(s) in this folder can be used to configure Luigi [navigation](navigation-configuration.md), [authorization](authorization-configuration.md), [general settings](general-setting.md) and more.
3. Open the directory where Luigi is installed. Search for the `luigi-config.js` file which can be used to configure Luigi [navigation](navigation-configuration.md), [authorization](authorization-configuration.md), [general settings](general-setting.md) and more.

## Application setup for React

Expand Down Expand Up @@ -216,4 +216,4 @@ $ npm start
```
<!-- accordion:end -->

2. Open the directory where Luigi is installed. Navigate to the `public` folder. The JavaScript file(s) in this folder can be used to configure Luigi [navigation](navigation-configuration.md), [authorization](authorization-configuration.md), [general settings](general-setting.md) and more.
2. Open the directory where Luigi is installed. Search for the `luigi-config.js` file which can be used to configure Luigi [navigation](navigation-configuration.md), [authorization](authorization-configuration.md), [general settings](general-setting.md) and more.
15 changes: 15 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,18 @@ Follow these steps to develop **micro frontends** and connect them to an already

1. [Install Luigi Client](luigi-client-setup.md).
2. Use the functions and parameters provided by the Luigi Client API. You can find them in the [Luigi Client API documentation](luigi-client-api.md).

### Examples

In the **Examples** section of our documentation, you can find links to several "Hello World" example applications which can help you explore Luigi's functions:
* [Angular](https://github.com/SAP/luigi/tree/master/core/examples/luigi-example-angular)
* [React](https://github.com/SAP/luigi/tree/master/core/examples/luigi-example-react)
* [Vue](https://github.com/SAP/luigi/tree/master/core/examples/luigi-example-vue)
* [OpenUI5](https://github.com/SAP/luigi/tree/master/core/examples/luigi-example-openui5)
* [Svelte](https://github.com/SAP/luigi/tree/master/core/examples/luigi-example-svelte)
* [Plain JavaScript](https://github.com/SAP/luigi/tree/master/core/examples/luigi-example-js)

You can install them by following the instructions in the `README` file of each example.

**Advanced users** can install our end-to-end test example application which includes all of Luigi's features in one place:
* [e2e example]()
8 changes: 4 additions & 4 deletions scripts/setup/angular.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ read -p "Luigi project folder name: " folder
echo ""
ng new $folder --routing && cd $folder

npm i -P @kyma-project/luigi-core @kyma-project/luigi-client fiori-fundamentals webpack webpack-cli @babel/core @babel/preset-env babel-loader
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
\ "buildConfig":"webpack --entry .\/src\/luigi-config\/basic\/basicConfiguration.js -o .\/src\/assets\/luigi-config\/luigi-config.js --mode production",/1' package.json > p.tmp.json && mv p.tmp.json package.json
mkdir -p src/luigi-config/basic

# the following steps can be copy and pasted to the terminal at once
mv src/index.html src/angular.html

# download
# download
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


# string replacements in some files
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/extendedConfiguration.bundle.js/luigi-config.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
Expand Down
6 changes: 3 additions & 3 deletions scripts/setup/no-framework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ npm init -y

# add "start" command to the package.json file. This command is split into 2 lines on purpose!
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
\ "buildConfig":"webpack --entry .\/src\/luigi-config\/basic\/basicConfiguration.js -o .\/public\/assets\/luigi-config\/luigi-config.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
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

Expand All @@ -22,7 +22,7 @@ curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-samp
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
sed "s|extendedConfiguration.bundle.js|luigi-config.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
Expand Down
4 changes: 2 additions & 2 deletions scripts/setup/openui5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ npm i -save @kyma-project/luigi-core @kyma-project/luigi-client fiori-fundamenta
mkdir -p public/assets
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/openui5/master/src/sap.m/test/sap/m/demokit/tutorial/quickstart/01/webapp/index.html | sed 's/src="..\/..\/..\/..\/..\/..\/..\/..\/resources\/sap-ui-core.js"/src="https:\/\/openui5.hana.ondemand.com\/resources\/sap-ui-core.js"/g' > public/ui5.html
curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-sample-angular/src/luigi-config/basic/basicConfiguration.js > public/assets/sampleconfig.js
curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-sample-angular/src/luigi-config/basic/basicConfiguration.js > public/assets/luigi-config/luigi-config.js
curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-sample-angular/src/assets/sampleexternal.html > public/assets/basicexternal.html
sed 's/extendedConfiguration.bundle.js/sampleconfig.js/g' public/index.html > public/index.tmp.html && mv public/index.tmp.html public/index.html
sed 's/extendedConfiguration.bundle.js/luigi-config.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
live-server --entry-file=index.html public
8 changes: 4 additions & 4 deletions scripts/setup/react.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
echo ""
echo "Installing Luigi with React specification"
echo ""
read -p "Luigi project folder name: " folder
echo "Creating luigified react app: " $folder
read -p "Luigi project folder name: " folder
echo "Creating luigified react app: " $folder

# create sample react app
npx create-react-app $folder && cd $folder
npx create-react-app $folder && cd $folder

# eject project to customize webpack configs
echo yes | npm run eject
Expand All @@ -29,7 +29,7 @@ mv public/index.html public/react.html
curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-example-react/public/index.html > public/index.html
curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-example-react/public/logo.png > public/logo.png
curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-example-react/public/sampleapp.html > public/sampleapp.html
curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-example-react/public/luigi-config.js > public/luigi-config.js
curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-example-react/public/luigi-config/luigi-config.js > public/luigi-config/luigi-config.js

# add index.js
curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-example-react/src/index.js > src/index.js
Expand Down
4 changes: 2 additions & 2 deletions scripts/setup/vue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ npm i -save @kyma-project/luigi-core @kyma-project/luigi-client fiori-fundamenta
mkdir -p public/assets
mv public/index.html public/vue.html
curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-example-vue/public/index.html > public/index.html
sed 's/luigi-config.js/assets\/sampleconfig.js/g' public/index.html > public/index.tmp.html && mv public/index.tmp.html public/index.html
curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-sample-angular/src/luigi-config/basic/basicConfiguration.js > public/assets/sampleconfig.js
sed 's/luigi-config.js/assets\/luigi-config\/luigi-config.js/g' public/index.html > public/index.tmp.html && mv public/index.tmp.html public/index.html
curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-sample-angular/src/luigi-config/basic/basicConfiguration.js > public/assets/luigi-config/luigi-config.js
curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-sample-angular/src/assets/sampleexternal.html > public/assets/basicexternal.html
echo "const webpack=require('webpack');const CopyWebpackPlugin=require('copy-webpack-plugin');module.exports={pages:{sampleapp:{entry:'src/main.js',template:'public/vue.html',filename:'vue.html'}},lintOnSave:true,runtimeCompiler:true,outputDir:'dist',configureWebpack:{plugins:[new CopyWebpackPlugin([{context:'public',to:'index.html',from:'index.html'},{context:'node_modules/@kyma-project/luigi-core',to:'./luigi-core',from:{glob:'**',dot:true}},{context:'node_modules/@kyma-project/luigi-client',to:'./luigi-client',from:{glob:'**',dot:true}}],{ignore:['.gitkeep','**/.DS_Store','**/Thumbs.db'],debug:'warning'})]}};" > vue.config.js
npm run serve