-
Notifications
You must be signed in to change notification settings - Fork 147
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
report
folder and the artifact -
Now you can get the artifact in
build
folder and process it further (scan, delivery, deploy and etc.)
- You don't need
--production
whenNODE_ENV
set toproduction
- If neither
--production
andNODE_ENV = production
is 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
This starter may not fit for your workflow, since it's opinionated. Therefore you can always fork and custom it to fit your workflow
☀️ Support this starter by sharing it to your friends, giving stars, or pull requests! 😄