Skip to content

Instantly share code, notes, and snippets.

@ilearnjavascript
Last active April 6, 2019 10:09
Show Gist options
  • Save ilearnjavascript/98bb9559cccbf5bc8b3bdfdde8ea21cb to your computer and use it in GitHub Desktop.
Save ilearnjavascript/98bb9559cccbf5bc8b3bdfdde8ea21cb to your computer and use it in GitHub Desktop.
gulp - gulpfile - 14.js
// build production
gulp.task('build:prod', function() {
const target = gulp.src('src/index.html');
const sources = gulp.src(['temp/main.min.js', 'temp/style.css'], { read: false });
return target.pipe(inject(sources))
.pipe(gulp.dest('build/prod'))
});
// build production runner
gulp.task('prod', gulp.series(
'compile:sass',
'autoprefix:css',
'babel',
'minify',
'prod:transfer',
'build:prod',
'clean'
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment