home chevron_right Documentation chevron_right Working with Fuse
Production
Build

The following command builds the application into an output directory

ng build

The build artifacts will be stored in the /dist directory. All commands that build or serve your project, will delete the output directory.

Bundling & Tree-Shaking (AoT)

To build your app with AoT (Ahead of Time) compiler, use the following command:

ng build --prod

or if you want to serve with AoT, use the following:

ng serve --prod

This will make use of uglifying and tree-shaking functionality while serving the app from the memory.

Alternative AoT compiler

If you happen to stumble upon an error while running the

ng build --prod

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:

npm run build-prod
Running unit tests
ng test

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

Running end-to-end tests
ng e2e

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.