diff --git a/gulpfile.js b/gulpfile.js index 3a421d9..30f3b02 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -15,12 +15,13 @@ var sourcemaps = require('gulp-sourcemaps'); var uglify = require('gulp-uglify-es').default; var enabled = { - uglify: argv.production, - maps: argv.production, - failCheck: argv.production, - prettyPug: !argv.production, - liveReload: !argv.production, + chmod: argv.production, cleanup: argv.production, + failCheck: argv.production, + liveReload: !argv.production, + maps: argv.production, + prettyPug: !argv.production, + uglify: argv.production, }; var destination = { @@ -67,7 +68,7 @@ gulp.task('scripts', function() { .pipe(gulpif(enabled.uglify, uglify())) .pipe(rename({suffix: '.min'})) .pipe(gulpif(enabled.maps, sourcemaps.write("."))) - .pipe(chmod(644)) + .pipe(gulpif(enabled.chmod, chmod(644))) .pipe(gulp.dest(destination.js)) .pipe(gulpif(enabled.liveReload, livereload())); }); @@ -82,7 +83,7 @@ gulp.task('scripts_tutti', function() { .pipe(concat("tutti.min.js")) .pipe(gulpif(enabled.uglify, uglify())) .pipe(gulpif(enabled.maps, sourcemaps.write("."))) - .pipe(chmod(644)) + .pipe(gulpif(enabled.chmod, chmod(644))) .pipe(gulp.dest(destination.js)) .pipe(gulpif(enabled.liveReload, livereload())); });