Here's a list of all of the supported npm
targets.
Use npm run build
to compile the Typescript into plain Javascript.
- calls
npm run clean
to remove any previously-compiled code - calls
npm run lint
to check for stylistic errors - runs
tsc
to compile the contents of thesrc/
folder.
The compiled code is placed into the lib/
folder.
npm run build
does not compile the unit test code.
Use npm run lint
to check for stylistic errors. All warnings are treated as errors.
Use npm run test
to run the unit tests.
- calls
npm run build
to make sure that your code is ready to be tested. - runs
mocha
(usingts-node
as the code loader) to run all the*.spec.ts
files in thesrc/
folder.
The compiled unit test *.spec.ts
files are never written into lib/
.
Use npm run cover
to run the unit tests and see code coverage metrics.
Metrics are written to the terminal, and are also published as HTML into the coverage/
folder.
Use npm run clean
to delete all of the compiled code.