daily pastebin goal
38%
SHARE
TWEET

Untitled

a guest Dec 10th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let gulp = require('gulp');
  2. let sass = require('gulp-sass');
  3. let browserSync = require('browser-sync');
  4.  
  5. gulp.task('styles', function() {
  6.   return gulp.src('app/scss/*.scss')
  7.     .pipe(sass())
  8.     .pipe(gulp.dest('app/css')) //removed semicolon
  9.     .pipe(browserSync.reload({ stream:true }));
  10. });
  11.  
  12. // watch Sass files for changes, run the Sass preprocessor with the 'sass' task and reload
  13. gulp.task('serve', gulp.series('styles', function() {
  14.   browserSync({
  15.     server: {
  16.       baseDir: './app'
  17.     }
  18.   });
  19.  
  20.   gulp.watch('app/scss/*.scss', gulp.series('styles'));
  21.   gulp.watch('app/css/*.css', browserSync.reload);
  22.   gulp.watch('app/**/*.html', browserSync.reload)
  23. }));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top