Created
June 11, 2015 23:45
-
-
Save stephensauceda/ce81e95c6f6c5747d8aa to your computer and use it in GitHub Desktop.
Revisions
-
stephensauceda created this gist
Jun 11, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ /* * Steps * 1. Rename your gulpfile.js to gulpfile.babel.js * 2. Add babel to your package.json (npm install -D babel) * 3. Start writing ES6 in your gulpfile! */ import gulp from 'gulp'; // ES6 imports! import sass from 'gulp-sass'; const sassOpts = { outputStyle: 'compressed', errLogToConsole: true }; // "let" and "const"!! gulp.task('sass', () = > { // Arrow functions!! gulp.src('./**/*.scss') .pipe(sass(sassOpts)) .pipe(gulp.dest('./')); }); gulp.task('default', ['sass'], () => { // Arrow functions!! gulp.watch('./src/sass/**/*.scss', ['sass']) .on('change', (e) => { // Arrow functions!! console.log(`File ${e.path} was ${e.type}, running Sass task...`); // Template strings and interpolation!! }); });