To launch the application you need to install the dependencies first with npm install
.
All the commands that developers will directly run are exposed as npm scripts. There are five of them:
-
npm start
- starts the development Web server that watches for the changes in the project. As soon as a change is made, it performs the required build steps (e.g. the TypeScript compilation) and then refreshes all currently opened pages in the browsers with the application. -
npm run lint
- runspolylint
one the project's code. In the future versions it'll also runtslint
. -
npm run test
- runsweb-component-tester
for the project. -
npm run build
- prepares the production version of the application. It creates a new directorydist
and puts there all files that need to be deployed. Usually you want to run it on your continuous integration server. -
npm run serve:dist
- this command internally executesnpm run build
and then additionally launches a static Web server (it supports sending gzipped files as well) in thedist
directory. Use this command when you are done with implementing a feature but before pushing the changes to the central repository. It gives you a chance to take a look at your application in the environment close to production.