The following command builds the application into an output directory
The build artifacts will be stored in the /dist directory. All commands that build or serve your project, will delete the output directory.
To build your app with AoT (Ahead of Time) compiler, use the following command:
or if you want to serve with AoT, use the following:
This will make use of uglifying and tree-shaking functionality while serving the app from the memory.
If you happen to stumble upon an error while running the
command, there is an alternative one that you can use. The following command will run the ng build --prod command with an increased memory size so your app can be built:
Tests will execute after a build is executed via Karma, and it will automatically watch your files for changes.
You can run tests a single time via --watch=false or --single-run
Before running the tests make sure you are serving the app via ng serve. End-to-end tests are run via Protractor.
For more information about angular-cli commands, check the angular-cli.