A build task that can be used regardless of the CLI answer.
$ npm run XXX is a script that is initially set in
In all cases, files with underscores at the beginning are excluded from the build.
# Watch build
$ npm run start
# Once build for NODE_ENV=development
$ npm run build
# Once build for NODE_ENV=production
$ npm run release
These commands include the following builds.
- Clean to output & stats directory (exc. Watch build)
- HTML/CSS/JS (using webpack)
- Copy for static files
- Create a manifest.json
- Create a Service Worker
- YAML to JSON conversion
Used local server is BrowserSync.
$ npm run server
#Build directory clean
Delete the contents of the output and stats directory.
$ npm run clean
$ npm run b:copy
$ npm run b:manifest
#YAML to JSON conversion
$ npm run b:yaml2json
$ npm run b:webpack