jescalan / rupture

Simple media queries in stylus

Home Page:http://jescalan.github.io/rupture

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to configure rupture with gulp + lost + stylus + postcss together?

rlam3 opened this issue · comments

commented

How to configure rupture with gulp + lost + stylus + postcss together?

it doesn't seem like rupture is working with gulp-stylus

var gulp = require('gulp');
var postcss = require('gulp-postcss');
var sourcemaps = require('gulp-sourcemaps');
var autoprefixer = require('autoprefixer');
var lost = require('lost');
var axis = require('axis');
// csswring compresses css
var nib = require('nib')
var csswring = require('csswring');
var stylus = require('gulp-stylus');
var rupture = require('rupture')
// var 


gulp.task('styles', function() {

  var processors = [
    lost(),
    autoprefixer({browsers:['last 2 version']}),
    // csswring,
  ]

  var stylus_options = {
    use : [     
        rupture(),
        axis(),
    ]
  }

  return gulp.src('stylus/styles.styl')
    .pipe(stylus(stylus_options))
    .pipe(postcss(processors))
    .pipe(gulp.dest('./dest'))
});

gulp.task('watch:styles', function(){
    gulp.watch('**/*.styl',['styles'])
})