Skip to content

Instantly share code, notes, and snippets.

@simonsmith
Created March 16, 2015 00:23
Show Gist options
  • Save simonsmith/092b761268e5e546c856 to your computer and use it in GitHub Desktop.
Save simonsmith/092b761268e5e546c856 to your computer and use it in GitHub Desktop.
Compiling SUIT with gulp and postcss
var gulp = require('gulp');
var bemLinter = require('postcss-bem-linter');
var atImport = require('postcss-import');
var cssnext = require('cssnext');
var postcss = require('gulp-postcss');
var concat = require('gulp-concat');
var notify = require('gulp-notify');
var stylus = require('gulp-stylus');
gulp.task('css', function() {
return gulp.src('*.styl')
.pipe(stylus().on('error', error))
.pipe(postcss([bemLinter()]).on('error', error))
.pipe(concat('built.css'))
.pipe(postcss([atImport(), cssnext()]))
.pipe(gulp.dest('./built'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment