Skip to content

Instantly share code, notes, and snippets.

@fernandiez
Created September 20, 2018 16:25
Show Gist options
  • Save fernandiez/3ca0a300cf0a4ceaadd61daed94652aa to your computer and use it in GitHub Desktop.
Save fernandiez/3ca0a300cf0a4ceaadd61daed94652aa to your computer and use it in GitHub Desktop.
Compilar JS
// JavaScript settings
const js = {
src : dir.src + 'js/**/*',
build : dir.build + 'js/',
filename : 'scripts.js'
};
// JavaScript processing
gulp.task('js', () => {
return gulp.src(js.src)
.pipe(deporder())
.pipe(concat(js.filename))
.pipe(stripdebug())
.pipe(uglify())
.pipe(gulp.dest(js.build))
.pipe(browsersync ? browsersync.reload({ stream: true }) : gutil.noop());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment