This is the Angular-based sample application which runs with Luigi framework.
Use Lerna to link the dependencies and bundle scripts within the packages.
To have this application running, follow these steps:
-
Install Lerna globally.
npm install -g lerna
-
Install dependencies by running the following command in the root
luigi
folder.# The `lerna bootstrap` command executes the npm package manager installation and links cross-dependencies. lerna bootstrap
-
Bundle Luigi Core by running the following command in the
luigi/core
folder.# Lerna runs the bundle script in every package where the script exists. lerna run bundle
-
Start the example application from the
luigi/core/examples/luigi-sample-angular
folder.The
src/luigi-config/extended
folder contains the default configuration that includes all available features. If you want to try out a simpler example, change the configuration reference in theindex.html
file to<script src="/assets/basicConfiguration.bundle.js"></script>
. You can edit thebasicConfiguration.bundle.js
file here.You can use hash-based routing or path-based routing in your application:
- To run Luigi with hash-based routing, set the routing.useHashrouting configuration to
true
. - To run Luigi with path-based routing, set the routing.useHashrouting configuration to
false
.
Run the server with the following command:
npm run start
- To run Luigi with hash-based routing, set the routing.useHashrouting configuration to
-
Go to http://localhost:4200/ to start the application.
-
Optional: Reflect the changes introducted to the Luigi Core code in the sample application.
-
Allow the Luigi Core to bundle every change you apply to it. The easiest approach is to open the Luigi
root
folder in another tab of your terminal window and run the following command:lerna run bundle-develop
-
The Luigi Client is not bundled, so you can update it without bundling.
-
The auto-reload of your application updates only the application. Type
CMD + R
to reflect the changes in the linked Luigi Core and Luigi Client modules on the website.
-
Run the sample application to perform the tests. When the application is ready:
- Run
npm run e2e:run
to start tests in the headless browser. - Run
npm run e2e:open
to start tests in the interactive mode.