Of course, you will need your build process to develop your project, but after that you will run different tasks to get your code ready for production. In the development stage, you need CSS code with CSS sourcemaps for easy debugging, and in the production stage, you probably will minify the CSS code without CSS sourcemaps.
gulp-environments plugin makes it convenient to create separate environments, such as development and production, to run your tasks in. You can install this plugin by running the following command:
npm install --save-dev gulp-environments
Then add the plugin to your
Gulpfile.jsfile, which should look like this:
var environments = require('gulp-environments');
Then assign ...