From 3211733044f70feeaead2abf29942f0e1c07a683 Mon Sep 17 00:00:00 2001 From: alexandra-simeonova Date: Wed, 12 Feb 2020 15:32:03 +0100 Subject: [PATCH 01/18] consolidating filenames and folders --- scripts/setup/angular.sh | 6 +++--- scripts/setup/openui5.sh | 2 +- scripts/setup/react.sh | 8 ++++---- scripts/setup/vue.sh | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/setup/angular.sh b/scripts/setup/angular.sh index 9bc4daf9c8..7d902faf2e 100755 --- a/scripts/setup/angular.sh +++ b/scripts/setup/angular.sh @@ -7,15 +7,15 @@ 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\/sampleconfig.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 diff --git a/scripts/setup/openui5.sh b/scripts/setup/openui5.sh index 651834a0ad..dfbb393a2b 100755 --- a/scripts/setup/openui5.sh +++ b/scripts/setup/openui5.sh @@ -11,7 +11,7 @@ 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/sampleconfig.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 cp -r node_modules/\@kyma-project/luigi-* public diff --git a/scripts/setup/react.sh b/scripts/setup/react.sh index 2e77aff6cd..f914b3b28c 100755 --- a/scripts/setup/react.sh +++ b/scripts/setup/react.sh @@ -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 @@ -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/sampleconfig.js > public/luigi-config/sampleconfig.js # add index.js curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-example-react/src/index.js > src/index.js diff --git a/scripts/setup/vue.sh b/scripts/setup/vue.sh index 9f480a54d9..ff158fb35e 100755 --- a/scripts/setup/vue.sh +++ b/scripts/setup/vue.sh @@ -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\/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/luigi-config/sampleconfig.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 From 99547e6d4942bb7ed7d11b8af42400ef19a425be Mon Sep 17 00:00:00 2001 From: alexandra-simeonova Date: Thu, 13 Feb 2020 09:55:23 +0100 Subject: [PATCH 02/18] luigi-config consistency --- scripts/setup/angular.sh | 4 ++-- scripts/setup/no-framework.sh | 6 +++--- scripts/setup/openui5.sh | 4 ++-- scripts/setup/react.sh | 2 +- scripts/setup/vue.sh | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/setup/angular.sh b/scripts/setup/angular.sh index 7d902faf2e..756f1e8c8b 100755 --- a/scripts/setup/angular.sh +++ b/scripts/setup/angular.sh @@ -9,7 +9,7 @@ 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 sed 's/"scripts": {/"scripts": {\ -\ "buildConfig":"webpack --entry .\/src\/luigi-config\/basic\/basicConfiguration.js -o .\/src\/assets\/luigi-config\/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 @@ -22,7 +22,7 @@ curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-samp # 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 diff --git a/scripts/setup/no-framework.sh b/scripts/setup/no-framework.sh index b3347c0357..621f3167f0 100755 --- a/scripts/setup/no-framework.sh +++ b/scripts/setup/no-framework.sh @@ -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 @@ -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 diff --git a/scripts/setup/openui5.sh b/scripts/setup/openui5.sh index dfbb393a2b..6a1149d98b 100755 --- a/scripts/setup/openui5.sh +++ b/scripts/setup/openui5.sh @@ -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/luigi-config/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 \ No newline at end of file diff --git a/scripts/setup/react.sh b/scripts/setup/react.sh index f914b3b28c..6404248cd7 100755 --- a/scripts/setup/react.sh +++ b/scripts/setup/react.sh @@ -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/sampleconfig.js > public/luigi-config/sampleconfig.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 diff --git a/scripts/setup/vue.sh b/scripts/setup/vue.sh index ff158fb35e..8ad54368af 100755 --- a/scripts/setup/vue.sh +++ b/scripts/setup/vue.sh @@ -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\/luigi-config\/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/luigi-config/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 From 17205c0214aff89d59da7a42bd8c1c0f5422462c Mon Sep 17 00:00:00 2001 From: alexandra-simeonova Date: Thu, 13 Feb 2020 10:28:19 +0100 Subject: [PATCH 03/18] include examples in docu --- docs/application-setup.md | 10 +++++----- docs/getting-started.md | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/docs/application-setup.md b/docs/application-setup.md index 2146cdc223..31cb25253e 100644 --- a/docs/application-setup.md +++ b/docs/application-setup.md @@ -68,7 +68,7 @@ live-server --entry-file=index.html public ``` -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` folder. The `luigi-config.js` file in this folder 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 @@ -104,7 +104,7 @@ npm run start ``` -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` folder. The `luigi-config.js` file in this folder 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 @@ -141,7 +141,7 @@ $ live-server --entry-file=index.html public ``` -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` folder. The `luigi-config.js` file in this folder 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 @@ -177,7 +177,7 @@ $ npm run serve ``` -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` folder. The `luigi-config.js` file in this folder 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 @@ -216,4 +216,4 @@ $ npm start ``` -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` folder. The `luigi-config.js` file in this folder can be used to configure Luigi [navigation](navigation-configuration.md), [authorization](authorization-configuration.md), [general settings](general-setting.md) and more. diff --git a/docs/getting-started.md b/docs/getting-started.md index a45fbe1133..10db386c77 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -28,7 +28,7 @@ This diagram illustrates the structure of Luigi: ## Prerequisites -* Basic knowledge of HTML +* Basic knowledge of HTML * Basic knowledge of JavaScript ## Steps @@ -52,3 +52,17 @@ 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) +* [Svelte]() +* [Plain JavaScript]() + +You can install them by following the instructions in the `README` file. + +Advanced users can install our end-to-end example application which includes all of Luigi's features: +* [e2e example]() From a36cf177cbb6d9504cc6cd6d90d82d195f978c68 Mon Sep 17 00:00:00 2001 From: alexandra-simeonova Date: Thu, 13 Feb 2020 11:45:56 +0100 Subject: [PATCH 04/18] update getting-started.md --- docs/getting-started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 10db386c77..539c3dda25 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -55,7 +55,7 @@ Follow these steps to develop **micro frontends** and connect them to an already ### 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: +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) @@ -64,5 +64,5 @@ In the Examples section of our documentation, you can find links to several "Hel You can install them by following the instructions in the `README` file. -Advanced users can install our end-to-end example application which includes all of Luigi's features: +**Advanced users** can install our end-to-end test example application which includes all of Luigi's features in one place: * [e2e example]() From 367cbecd3e3e7dc57b52932fed1be7ea3baebe7d Mon Sep 17 00:00:00 2001 From: alexandra-simeonova Date: Fri, 14 Feb 2020 09:48:01 +0100 Subject: [PATCH 05/18] update getting-started.md --- docs/getting-started.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 539c3dda25..93f5df5f1a 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -59,10 +59,11 @@ In the **Examples** section of our documentation, you can find links to several * [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) +* [UI5]() * [Svelte]() * [Plain JavaScript]() -You can install them by following the instructions in the `README` file. +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]() From 58454b59459b652045f8b912b629ba3ff833d44e Mon Sep 17 00:00:00 2001 From: alexandra-simeonova Date: Wed, 19 Feb 2020 13:52:03 +0100 Subject: [PATCH 06/18] remove folder mention --- docs/application-setup.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/application-setup.md b/docs/application-setup.md index 31cb25253e..1b5051d1a8 100644 --- a/docs/application-setup.md +++ b/docs/application-setup.md @@ -68,7 +68,7 @@ live-server --entry-file=index.html public ``` -3. Open the directory where Luigi is installed. Search for the `luigi-config` folder. The `luigi-config.js` file 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 @@ -104,7 +104,7 @@ npm run start ``` -3. Open the directory where Luigi is installed. Search for the `luigi-config` folder. The `luigi-config.js` file 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 @@ -141,7 +141,7 @@ $ live-server --entry-file=index.html public ``` -3. Open the directory where Luigi is installed. Search for the `luigi-config` folder. The `luigi-config.js` file 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 @@ -177,7 +177,7 @@ $ npm run serve ``` -3. Open the directory where Luigi is installed. Search for the `luigi-config` folder. The `luigi-config.js` file 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 @@ -216,4 +216,4 @@ $ npm start ``` -2. Open the directory where Luigi is installed. Search for the `luigi-config` folder. The `luigi-config.js` file 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. From 5d2e10c6805f88930761edfb782a5e0b7e27eadf Mon Sep 17 00:00:00 2001 From: Markus <1720843+maxmarkus@users.noreply.github.com> Date: Wed, 19 Feb 2020 14:38:50 +0100 Subject: [PATCH 07/18] Apply suggestions from code review --- docs/getting-started.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index c84948be35..8042c95f3a 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -136,9 +136,9 @@ In the **Examples** section of our documentation, you can find links to several * [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) -* [UI5]() -* [Svelte]() -* [Plain JavaScript]() +* [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. From 7aec7c8ece2ebf0b438882356c5ae364096dfa2c Mon Sep 17 00:00:00 2001 From: alexandra-simeonova Date: Fri, 21 Feb 2020 11:42:14 +0100 Subject: [PATCH 08/18] e2e link --- docs/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 8042c95f3a..28503c32f3 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -143,4 +143,4 @@ In the **Examples** section of our documentation, you can find links to several 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]() +* [e2e example](https://github.com/SAP/luigi/tree/master/test/e2e-test-application) From b346dd4975b71638a55146e18a5a02cf7396a9c6 Mon Sep 17 00:00:00 2001 From: Aleksandra Simeonova Date: Tue, 25 Feb 2020 13:08:44 +0100 Subject: [PATCH 09/18] Update docs/application-setup.md Co-Authored-By: Barbara Szwarc --- docs/application-setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/application-setup.md b/docs/application-setup.md index 1b5051d1a8..9bce5ba6ee 100644 --- a/docs/application-setup.md +++ b/docs/application-setup.md @@ -68,7 +68,7 @@ live-server --entry-file=index.html public ``` -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. +3. Open the directory where Luigi is installed. Search for the `luigi-config.js` file which you can use to configure Luigi [navigation](navigation-configuration.md), [authorization](authorization-configuration.md), [general settings](general-setting.md) and more. ## Application setup for Angular 6 From 1ece6a4d0a3dab467e58065e155ea3245224ebf1 Mon Sep 17 00:00:00 2001 From: Aleksandra Simeonova Date: Tue, 25 Feb 2020 13:08:53 +0100 Subject: [PATCH 10/18] Update docs/application-setup.md Co-Authored-By: Barbara Szwarc --- docs/application-setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/application-setup.md b/docs/application-setup.md index 9bce5ba6ee..debd5e5262 100644 --- a/docs/application-setup.md +++ b/docs/application-setup.md @@ -177,7 +177,7 @@ $ npm run serve ``` -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. +3. Open the directory where Luigi is installed. Search for the `luigi-config.js` file you can use to configure Luigi [navigation](navigation-configuration.md), [authorization](authorization-configuration.md), [general settings](general-setting.md) and more. ## Application setup for React From 55299b05f182a3cd851cadb9e275309b9defb513 Mon Sep 17 00:00:00 2001 From: Aleksandra Simeonova Date: Tue, 25 Feb 2020 13:10:58 +0100 Subject: [PATCH 11/18] Update docs/getting-started.md Co-Authored-By: Barbara Szwarc --- docs/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 28503c32f3..73d873ebff 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -142,5 +142,5 @@ In the **Examples** section of our documentation, you can find links to several 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: +**Advanced users** can install our end-to-end test sample application which includes all of Luigi's features in one place: * [e2e example](https://github.com/SAP/luigi/tree/master/test/e2e-test-application) From 821fa74ee0ad0dc1ddc69f6aa275a07a03944482 Mon Sep 17 00:00:00 2001 From: Aleksandra Simeonova Date: Tue, 25 Feb 2020 13:11:04 +0100 Subject: [PATCH 12/18] Update docs/application-setup.md Co-Authored-By: Barbara Szwarc --- docs/application-setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/application-setup.md b/docs/application-setup.md index debd5e5262..fd776a0523 100644 --- a/docs/application-setup.md +++ b/docs/application-setup.md @@ -216,4 +216,4 @@ $ npm start ``` -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. +2. Open the directory where Luigi is installed. Search for the `luigi-config.js` file which you can use to configure Luigi [navigation](navigation-configuration.md), [authorization](authorization-configuration.md), [general settings](general-setting.md) and more. From 63991324a5adba27e8b0f5276c74507e6012f742 Mon Sep 17 00:00:00 2001 From: Aleksandra Simeonova Date: Tue, 25 Feb 2020 13:11:36 +0100 Subject: [PATCH 13/18] Update docs/application-setup.md Co-Authored-By: Barbara Szwarc --- docs/application-setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/application-setup.md b/docs/application-setup.md index fd776a0523..2660e0a728 100644 --- a/docs/application-setup.md +++ b/docs/application-setup.md @@ -141,7 +141,7 @@ $ live-server --entry-file=index.html public ``` -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. +3. Open the directory where Luigi is installed. Search for the `luigi-config.js` file which you can use to configure Luigi [navigation](navigation-configuration.md), [authorization](authorization-configuration.md), [general settings](general-setting.md) and more. ## Application setup for VUE.JS From d2d74a64cfa12cd1d87fca1d3a64f7cb8d74639f Mon Sep 17 00:00:00 2001 From: Aleksandra Simeonova Date: Tue, 25 Feb 2020 13:12:03 +0100 Subject: [PATCH 14/18] Update docs/application-setup.md Co-Authored-By: Barbara Szwarc --- docs/application-setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/application-setup.md b/docs/application-setup.md index 2660e0a728..9f400f8827 100644 --- a/docs/application-setup.md +++ b/docs/application-setup.md @@ -104,7 +104,7 @@ npm run start ``` -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. +3. Open the directory where Luigi is installed. Search for the `luigi-config.js` file which you can use to configure Luigi [navigation](navigation-configuration.md), [authorization](authorization-configuration.md), [general settings](general-setting.md) and more. ## Application setup for SAPUI5/OpenUI5 From 455d51ae86aa23cad471a733431759c876134a73 Mon Sep 17 00:00:00 2001 From: Aleksandra Simeonova Date: Tue, 25 Feb 2020 13:26:41 +0100 Subject: [PATCH 15/18] empty commit --- docs/application-setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/application-setup.md b/docs/application-setup.md index 9f400f8827..b218418e69 100644 --- a/docs/application-setup.md +++ b/docs/application-setup.md @@ -216,4 +216,4 @@ $ npm start ``` -2. Open the directory where Luigi is installed. Search for the `luigi-config.js` file which you can use 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 you can use to configure Luigi [navigation](navigation-configuration.md), [authorization](authorization-configuration.md), [general settings](general-setting.md) and more. \ No newline at end of file From 555242127eebbea978f88a2193de06b89a57f0f8 Mon Sep 17 00:00:00 2001 From: Markus Edenhauser <1720843+maxmarkus@users.noreply.github.com> Date: Wed, 4 Mar 2020 10:54:18 +0100 Subject: [PATCH 16/18] script updates to not have luigi-config folders but just files --- scripts/setup/angular.sh | 2 +- scripts/setup/no-framework.sh | 2 +- scripts/setup/openui5.sh | 2 +- scripts/setup/react.sh | 2 +- scripts/setup/vue.sh | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/setup/angular.sh b/scripts/setup/angular.sh index 756f1e8c8b..989b3d4bc0 100755 --- a/scripts/setup/angular.sh +++ b/scripts/setup/angular.sh @@ -9,7 +9,7 @@ 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 sed 's/"scripts": {/"scripts": {\ -\ "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 +\ "buildConfig":"webpack --entry .\/src\/luigi-config\/basic\/basicConfiguration.js -o .\/src\/assets\/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 diff --git a/scripts/setup/no-framework.sh b/scripts/setup/no-framework.sh index 621f3167f0..0e3fa5008a 100755 --- a/scripts/setup/no-framework.sh +++ b/scripts/setup/no-framework.sh @@ -11,7 +11,7 @@ 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\/luigi-config\/luigi-config.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.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 diff --git a/scripts/setup/openui5.sh b/scripts/setup/openui5.sh index 6a1149d98b..a09efa5880 100755 --- a/scripts/setup/openui5.sh +++ b/scripts/setup/openui5.sh @@ -11,7 +11,7 @@ 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/luigi-config/luigi-config.js +curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-sample-angular/src/luigi-config/basic/basicConfiguration.js > public/assets/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/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 diff --git a/scripts/setup/react.sh b/scripts/setup/react.sh index 6404248cd7..41355a12e5 100755 --- a/scripts/setup/react.sh +++ b/scripts/setup/react.sh @@ -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/luigi-config.js > public/luigi-config/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.js # add index.js curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-example-react/src/index.js > src/index.js diff --git a/scripts/setup/vue.sh b/scripts/setup/vue.sh index 8ad54368af..ea1ca436f3 100755 --- a/scripts/setup/vue.sh +++ b/scripts/setup/vue.sh @@ -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\/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 +sed 's/luigi-config.js/assets\/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.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 From 4aac7307c1b88053968c1f0735f2628175b75f24 Mon Sep 17 00:00:00 2001 From: Markus Edenhauser <1720843+maxmarkus@users.noreply.github.com> Date: Wed, 4 Mar 2020 15:16:06 +0100 Subject: [PATCH 17/18] more script fixes and optimizations --- scripts/setup/angular.sh | 7 ++++++- scripts/setup/no-framework.sh | 15 +++++++++++---- scripts/setup/openui5.sh | 7 ++++++- scripts/setup/react.sh | 8 ++++++-- scripts/setup/vue.sh | 10 ++++++++-- 5 files changed, 37 insertions(+), 10 deletions(-) diff --git a/scripts/setup/angular.sh b/scripts/setup/angular.sh index 989b3d4bc0..185cf9820e 100755 --- a/scripts/setup/angular.sh +++ b/scripts/setup/angular.sh @@ -2,7 +2,12 @@ echo "" echo "Installing Luigi with Angular and basic configuration" echo "" -read -p "Luigi project folder name: " folder +if [[ "$1" = "" ]]; then + read -p "Luigi project folder name: " folder +else + folder=$1 + echo "Luigi project folder name: $folder" +fi # steps to execute line by line echo "" ng new $folder --routing && cd $folder diff --git a/scripts/setup/no-framework.sh b/scripts/setup/no-framework.sh index 0e3fa5008a..d93df7eb33 100755 --- a/scripts/setup/no-framework.sh +++ b/scripts/setup/no-framework.sh @@ -2,25 +2,32 @@ echo "" echo "Installing Luigi with static files and basic configuration" echo "" -read -p "Luigi project folder name: " folder + +if [[ "$1" = "" ]]; then + read -p "Luigi project folder name: " folder +else + folder=$1 + echo "Luigi project folder name: $folder" +fi # steps to execute line by line echo "" + mkdir $folder && cd $folder 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\/luigi-config.js --mode production",/1' package.json > p.tmp.json && mv p.tmp.json package.json +\ "buildConfig":"webpack --entry .\/src\/luigi-config.js -o .\/public\/assets\/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 mkdir -p public/assets -mkdir -p src/luigi-config/basic +mkdir -p src #download important files from GitHub 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 +curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-sample-angular/src/luigi-config/basic/basicConfiguration.js > src/luigi-config.js sed "s|extendedConfiguration.bundle.js|luigi-config.js|g" public/index.html > public/index.tmp.html && mv public/index.tmp.html public/index.html diff --git a/scripts/setup/openui5.sh b/scripts/setup/openui5.sh index a09efa5880..8fed317771 100755 --- a/scripts/setup/openui5.sh +++ b/scripts/setup/openui5.sh @@ -2,7 +2,12 @@ echo "" echo "Installing Luigi with static files and basic configuration" echo "" -read -p "Luigi project folder name: " folder +if [[ "$1" = "" ]]; then + read -p "Luigi project folder name: " folder +else + folder=$1 + echo "Luigi project folder name: $folder" +fi # steps to execute line by line echo "" mkdir $folder && cd $folder diff --git a/scripts/setup/react.sh b/scripts/setup/react.sh index 41355a12e5..29ae5031a5 100755 --- a/scripts/setup/react.sh +++ b/scripts/setup/react.sh @@ -2,8 +2,12 @@ echo "" echo "Installing Luigi with React specification" echo "" -read -p "Luigi project folder name: " folder -echo "Creating luigified react app: " $folder +if [[ "$1" = "" ]]; then + read -p "Luigi project folder name: " folder +else + folder=$1 + echo "Luigi project folder name: $folder" +fi # create sample react app npx create-react-app $folder && cd $folder diff --git a/scripts/setup/vue.sh b/scripts/setup/vue.sh index ea1ca436f3..cba84b7deb 100755 --- a/scripts/setup/vue.sh +++ b/scripts/setup/vue.sh @@ -1,13 +1,19 @@ #!/bin/bash if ! command -v vue 2>/dev/null; then echo "Vue CLI required, please install it globally and try again." - echo "npm i -g @vue/cli." + echo "npm i -g @vue/cli" exit 1; fi + echo "" echo "Installing Luigi with static files and basic configuration" echo "" -read -p "Luigi project folder name: " folder +if [[ "$1" = "" ]]; then + read -p "Luigi project folder name: " folder +else + folder=$1 + echo "Luigi project folder name: $folder" +fi # steps to execute line by line echo "" vue create -d $folder && cd $folder From 09b871ce5e7c37bc11557df73818c28b85dcd1ab Mon Sep 17 00:00:00 2001 From: Aleksandra Simeonova Date: Wed, 4 Mar 2020 15:33:34 +0100 Subject: [PATCH 18/18] reflect script changes in md file --- docs/application-setup.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/application-setup.md b/docs/application-setup.md index b218418e69..0fd1c004d7 100644 --- a/docs/application-setup.md +++ b/docs/application-setup.md @@ -53,14 +53,14 @@ or execute these commands manually to get the same result: 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 +\ "buildConfig":"webpack --entry .\/src\/luigi-config.js -o .\/public\/assets\/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 mkdir -p public/assets -mkdir -p src/luigi-config/basic +mkdir -p src 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 +curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-sample-angular/src/luigi-config/basic/basicConfiguration.js > src/luigi-config.js +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 npm run buildConfig @@ -89,13 +89,13 @@ or execute these commands manually to get the same result: 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 +\ "buildConfig":"webpack --entry .\/src\/luigi-config\/basic\/basicConfiguration.js -o .\/src\/assets\/luigi-config.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/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 @@ -132,9 +132,9 @@ $ npm init -y $ npm i -save @kyma-project/luigi-core @kyma-project/luigi-client fiori-fundamentals $ mkdir -p public/assets $ curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-sample-angular/src/index.html > public/index.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 $ 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.js $ curl https://raw.githubusercontent.com/SAP/luigi/master/core/examples/luigi-sample-angular/src/assets/sampleexternal.html > public/assets/basicexternal.html $ cp -r node_modules/\@kyma-project/luigi-* public $ live-server --entry-file=index.html public @@ -169,8 +169,8 @@ $ npm i -save @kyma-project/luigi-core @kyma-project/luigi-client fiori-fundamen $ 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.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.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