Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. // Require our dependencies
  2. var gulp = require('gulp');
  3. var sass = require('gulp-sass');
  4. var browserSync = require('browser-sync').create();
  5.  
  6. gulp.task('styles', function(){
  7. return gulp.src('sass/style.scss')
  8. .pipe(sass({
  9. outputStyle: 'expanded', // Options: nested, expanded, compact, compressed
  10. indentType: 'tab',
  11. indentWidth: 1
  12. })) // Converts Sass to CSS with gulp-sass
  13. .pipe(gulp.dest('./'))
  14. .pipe(browserSync.reload({stream: true}));
  15. });
  16.  
  17. // Gulp watch syntax
  18. gulp.task('serve', function(){
  19.  
  20. // Kick off BrowserSync.
  21. browserSync.init({
  22. proxy: "www.example.dev"
  23. });
  24.  
  25. gulp.watch('sass/**/*.scss', ['styles']);
  26. });
  27.  
  28. // Default Gulp task
  29. gulp.task('default',['styles', 'serve']);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement