OLD | NEW |
(Empty) | |
| 1 var gulp = require('gulp'); |
| 2 var rename = require('gulp-rename'); |
| 3 var sass = require('gulp-sass'); |
| 4 var postcss = require('gulp-postcss'); |
| 5 var cssMQPacker = require("css-mqpacker"); |
| 6 |
| 7 var postcssProcessors = [cssMQPacker()]; |
| 8 |
| 9 gulp.task('sass', function () { |
| 10 gulp.src('./scss/main.scss') |
| 11 .pipe(sass().on('error', sass.logError)) |
| 12 .pipe(rename('default.css')) |
| 13 .pipe(gulp.dest('./css')); |
| 14 |
| 15 gulp.src('./scss/main.scss') |
| 16 .pipe(sass().on('error', sass.logError)) |
| 17 .pipe(postcss(postcssProcessors)) |
| 18 .pipe(rename('packed.css')) |
| 19 .pipe(gulp.dest('./css')); |
| 20 }); |
| 21 |
| 22 gulp.task('watch', function () { |
| 23 gulp.watch('./scss/*.scss', ['sass']); |
| 24 }); |
| 25 |
| 26 gulp.task('default', ['sass', 'watch']); |
OLD | NEW |