zengenti-buildstartup-package
v0.0.18
Published
Post-build scripts to generate the startup scripts for any configured environments
Downloads
1,996
Maintainers
Readme
Zengenti Build Startup Package
To use
npm i --save-dev zengenti-buildstartup-package
Then in your webpack.config.prod.js
include a plugin to execute some post-build-scripts:
const WebpackShellPlugin = require('webpack-shell-plugin');
plugins: [
new WebpackShellPlugin({
onBuildEnd: [
'echo "Executing Webpack post build scripts..."',
'node node_modules/zengenti-buildstartup-package',
],
}),
]
Run your build as normal, you should see additional output in your build logs and scripts for each environment defined in .env*
files in your project
/* buildStartup.js */
Found environment in: ".env"
-- Created "dist/static/startup.js"
-- Created "dist/server/start.js"
-- Created "dist/server/start.council-cms.js"
Found environment in: ".env.cambridgeshire"
-- Created "dist/server/start.cambridgeshire.council-cms.js"
Found environment in: ".env.peterborough"
-- Created "dist/server/start.peterborough.council-cms.js"
Deploying server start scripts
buildStartup.js completed successfully