Run build scripts only when files changed.
npm install bic-build-if-changedpackage.json for bic config (example config - "bic": ["src"]).
./node_modules/bic-build-if-changed/cache.
bic will execute npm run build
sh
npm i bic-build-if-changed -D
or
yarn add bic-build-if-changed -D
`
2. Edit your package.json module to customize the behavior:
`js
// Only the "src" & "public" directories:
"bic": ["src", "public"],
// Disable bic for a package:
"bic": false,
// Use default directories ("src"):
"bic": true,
`
3. Use the package: (using with npm)
`sh
npm run build-if-changed
or
npm run bic
you can use -force (or) -F flag to Force Re-Build
npm run bic -F
`
3. Use the package: (using with yarn)
`sh
yarn build-if-changed
or
yarn bic
you can use -force (or) -F flag to Force Re-Build
yarn bic -F
`
Notes
- Only bic config directories are watched, by default ./src` directory is only watched.