Skip to content

Managing build environments

James, please edited this page Oct 9, 2015 · 1 revision

This boilerplate does not include different environments, like one for development and production. This is solely because none of the features of the boilerplate would be toggled in such an environment.

Because the boilerplate just uses Gulp, traditional Gulp ways to manage environments could be used here, too.

This could include any of the following steps:

  1. Running NODE_ENV=production npm run x, where x is the script that you're executing.
  2. Access that variable in your Gulpfile via process.env.NODE_ENV
  3. Conditionally run Gulp tasks based on this value using gulp-if
  4. Pass that value to any server that your Gulpfile might start

These are just some ideas on how to manage different environments using the boilerplate. Use it as inspiration to find what works best for your project!

Clone this wiki locally