This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define your plugins here, make sure you have `gulp-util`... | |
var gutil = require('gulp-util'); | |
/** | |
* Define dev CLI flag | |
* Run `gulp --dev` | |
*/ | |
var isDev = gutil.env.dev; | |
gulp.task('scripts', function() { | |
return gulp.src('src/scripts/*/**.js') | |
.pipe(concat('main.js')) | |
.pipe(gulpif(!isDev, $.uglify())) // If we use the `--dev` flag, uglify will not take place. | |
.pipe(gulp.dest('dist/scripts')) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment