Skip to content

Instantly share code, notes, and snippets.

@tlhunter
Created February 23, 2019 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tlhunter/81af136278e4300eceea6491015d326f to your computer and use it in GitHub Desktop.
Save tlhunter/81af136278e4300eceea6491015d326f to your computer and use it in GitHub Desktop.
LogRocket > Node.js Task Runners: Are they right for you?
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