Skip to content
Permalink
Browse files

Upgrade to gulp 4

By upgrading to gulp 4 we keep things up-to-date, but we also remove a
security vulnerability.
  • Loading branch information...
tysongach committed Jul 22, 2018
1 parent ad61bcc commit b4533e18edb378562ff6392ee971efb78434cb17
Showing with 2,870 additions and 730 deletions.
  1. +29 −18 Gulpfile.js
  2. +2,840 −711 package-lock.json
  3. +1 −1 package.json
@@ -4,29 +4,40 @@ const gulp = require('gulp');
const sass = require('gulp-sass');

const paths = {
scss: [
'./core/**/*.scss',
'./contrib/*.scss',
]
markup: {
src: './contrib/**/*.html',
},
styles: {
src: [
'./contrib/**/*.scss',
'./core/**/*.scss',
],
dest: './contrib/',
}
};

gulp.task('serve', ['sass'], function() {
function styles() {
return gulp.src(paths.styles.src)
.pipe(sass({includePaths: bourbon}))
.pipe(gulp.dest(paths.styles.dest));
};

function serve(done) {
browserSync.init({
open: false,
server: './contrib',
server: './contrib/',
});
done();
}

gulp.watch(paths.scss, ['sass']);
gulp.watch('contrib/*.html').on('change', browserSync.reload);
});
function reload(done) {
browserSync.reload();
done();
}

gulp.task('sass', function() {
return gulp.src(paths.scss)
.pipe(sass({
includePaths: ['styles'].concat(bourbon),
}))
.pipe(gulp.dest('./contrib'))
.pipe(browserSync.stream());
});
function watch() {
gulp.watch(paths.markup.src, reload);
gulp.watch(paths.styles.src, gulp.series(styles, reload));
}

gulp.task('default', ['serve']);
gulp.task('default', gulp.series(styles, serve, watch));

0 comments on commit b4533e1

Please sign in to comment.
You can’t perform that action at this time.