The build system of this project is based on Gulp, to automate the development and build workflow.
The various tasks described here are defined in modules located in the gulp/
folder. You can read more about how to
customize them and define your own tasks in the
Gulp documentation.
gulp
Build and optimize the current project, ready for deployment. This includes linting as well as image, script, stylesheet and HTML optimization and minification.
Task | Description |
---|---|
serve | Launch a web server with live reload and open app in browser. |
serve:dist | Launch a web server using dist files with live reload and open app in browser. |
build | Build and optimize the current project, ready for deployment. This includes linting as well as image, script, stylesheet and HTML optimization and minification. |
clean | Delete temporary files and dist files. |
When building the application, you can specify the target environment using the flag --environment <name>
.
The default build environment is production
. See this documentation for more details
about multiple build environments management.
You can disable opening automatically your default browser when using the serve
commands by using the flag
--skip-open
.
Task | Description |
---|---|
test | Launch unit tests using karma and jasmine. |
test:auto | Launch karma server and trigger unit tests after each change in project file. |
protractor | Launch e2e tests using protractor. |
protractor:dist | Launch e2e tests using protractor, using dist files. |
webdriver:update | Download/Update selenium standalone and chromedriver. |
webdriver:standalone | Launch a standalone selenium server. |
Task | Description |
---|---|
translations | Generate translations file in .tmp that will be used by server. |
translations:extract | Extract Messages from Code and Templates to template.pot. |
Task | Description |
---|---|
scripts | Convert all *.ts found in project to js in the temporary folder. |
tsd | Download and update all TypeScript definitions for Bower dependencies. |
tsd:restore | Download TypeScript definitions according to tsd.json. |
tsd:clean | Delete downloaded TypeScript definitions. |
Task | Description |
---|---|
build:source | Build and optimize all source files, excluding assets. |
partials | Put all .html found in project folder + in temporary folder in a template cache file. |
styles | Generate main CSS file using project main style file. |
fonts | Copy fonts from bower dependencies in dist folder. |
images | Compress images (using imagemin) then copy them in dist folder. |
other | Copy project fonts and other misc files in dist folder. |
extra | Copy extra non-project files as specified in gulpfile.config.js . |
clean:dist | Clean the dist folder. |
When building your app, you can use the --debug
flag with any build task to skip the minification process. This can
be useful to debug your production builds.