-
-
Save tlhunter/81af136278e4300eceea6491015d326f to your computer and use it in GitHub Desktop.
LogRocket > Node.js Task Runners: Are they right for you?
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
const gulp = require('gulp'); | |
const sass = require('gulp-sass'); | |
const concat = require('gulp-concat'); | |
sass.compiler = require('node-sass'); | |
gulp.task('style', function () { | |
return gulp.src('./src/styles/*.scss') | |
.pipe(sass().on('error', sass.logError)) | |
.pipe(concat('dist.css')) | |
.pipe(gulp.dest('./public/')); | |
}); | |
gulp.task('script', function () { | |
return gulp.src('./src/scripts/*.js') | |
.pipe(concat('dist.js')) | |
.pipe(gulp.dest('./public/')); | |
}); | |
gulp.task('build', gulp.series('style', 'script')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment