Index: gulpfile.js |
=================================================================== |
new file mode 100644 |
--- /dev/null |
+++ b/gulpfile.js |
@@ -0,0 +1,26 @@ |
+var gulp = require('gulp'); |
juliandoucette
2017/05/22 11:20:09
Did you mean to include scss to run this?
|
+var rename = require('gulp-rename'); |
+var sass = require('gulp-sass'); |
+var postcss = require('gulp-postcss'); |
+var cssMQPacker = require("css-mqpacker"); |
+ |
+var postcssProcessors = [cssMQPacker()]; |
+ |
+gulp.task('sass', function () { |
+ gulp.src('./scss/main.scss') |
+ .pipe(sass().on('error', sass.logError)) |
+ .pipe(rename('default.css')) |
+ .pipe(gulp.dest('./css')); |
+ |
+ gulp.src('./scss/main.scss') |
+ .pipe(sass().on('error', sass.logError)) |
+ .pipe(postcss(postcssProcessors)) |
+ .pipe(rename('packed.css')) |
+ .pipe(gulp.dest('./css')); |
+}); |
+ |
+gulp.task('watch', function () { |
+ gulp.watch('./scss/*.scss', ['sass']); |
+}); |
+ |
+gulp.task('default', ['sass', 'watch']); |