Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: gulpfile.js

Issue 29441585: No Issue - SCSS Media Query Style Proposal (Closed)
Patch Set: Created May 18, 2017, 10:55 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 var gulp = require('gulp');
juliandoucette 2017/05/22 11:20:09 Did you mean to include scss to run this?
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']);
OLDNEW

Powered by Google App Engine
This is Rietveld