-
-
Save ilearnjavascript/98bb9559cccbf5bc8b3bdfdde8ea21cb to your computer and use it in GitHub Desktop.
gulp - gulpfile - 14.js
This file contains hidden or 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
// 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