Repository navigation
Continuous Integration
Antony Budianto edited this page Jul 28, 2016
·
7 revisions
The starter supports Continuous integration and delivery pipeline by:
- Installing only needed dependencies so it's faster and efficient
- Run linting and unit test and will fail the build if one test failed or any error thrown
- Build the production ready artifact
- NodeJS and npm, using nvm is recommended
- Git
- Any CI servers (Jenkins, Travis, etc)
-
Clone or pull your project repository and change directory to there
-
Install packages needed for production build
npm install --production
-
Finally run the build tasks
npm run build
It will run unit tests and if all passed, it will create the
reportfolder and the artifact -
Now you can get the artifact in
buildfolder and process it further (scan, delivery, deploy and etc.)
- You don't need
--productionwhenNODE_ENVset toproduction- If neither
--productionandNODE_ENV = productionis specified, then npm will install all dependencies including unneeded development dependencies!
- Adjust your dependencies according to your project needs, so it can boost install time during build process
- Moves all packages used only during development to
devDependencies
- Moves all packages used only during development to
- Use gzip extension to compress your static assets