zengenti-buildstartup-package

0.0.18 • Public • Published

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

Package Sidebar

Install

npm i zengenti-buildstartup-package

Weekly Downloads

571

Version

0.0.18

License

ISC

Unpacked Size

63 kB

Total Files

25

Last publish

Collaborators

  • n.flatley