gulpfile.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Include gulp
  2. var gulp = require('gulp');
  3. // Include Our Plugins
  4. var wrap = require('gulp-wrap');
  5. var autoprefixer = require('gulp-autoprefixer');
  6. var sass = require('gulp-sass');
  7. var plumber = require('gulp-plumber');
  8. var watch = require('gulp-watch');
  9. // Compile our SCSS
  10. gulp.task('scss', function() {
  11. return gulp.src( 'scss/main.scss')
  12. .pipe(plumber({
  13. errorHandler: function (err) {
  14. console.log(err.formatted);
  15. this.emit('end');
  16. }
  17. }))
  18. .pipe(sass())
  19. .pipe(autoprefixer({
  20. browsers: ['last 3 versions'],
  21. cascade: false
  22. }))
  23. .pipe(wrap('<style type="text/css">\n<%= contents %>\n</style>'))
  24. .pipe(gulp.dest('css'));
  25. });
  26. //
  27. // gulp.task('wrap', function(){
  28. // return gulp.src( 'bower_components/lightbox2/dist/css/lightbox.min.css')
  29. // .pipe(wrap('<style type="text/css">\n<%= contents %>\n</style>'))
  30. // .pipe(gulp.dest('css'));
  31. // })
  32. // Watch Files For Changes
  33. // gulp.task('default', ['scss'], function() {
  34. // gulp.watch( 'scss/*.scss', ['scss']);
  35. // });
  36. // Default Task
  37. gulp.task('default', ['scss']);