Skip to content

Instantly share code, notes, and snippets.

@infinito84
Created October 2, 2015 15:21
Show Gist options
  • Save infinito84/3cccb6372879e2f1233d to your computer and use it in GitHub Desktop.
Save infinito84/3cccb6372879e2f1233d to your computer and use it in GitHub Desktop.
var gulp = require('gulp'),
stylus = require('gulp-stylus'),
nib = require('nib'),
$ = require('jquery');
module.exports = {
gulp : function(){
var that = this;
gulp.task('stylus', function () {
gulp.src('./stylus/index.styl')
.pipe(stylus({
'include css': true,
use: nib(),
compress : true
}))
.pipe(gulp.dest('./css/'))
.on('end', function(){
$('#stylus').attr('href', 'css/index.css?v='+ Math.random());
});
});
gulp.watch(['**/*.styl'], ['stylus']);
}
}
//HowTo Use
//var dev = require('/relative/path/this_file');
//dev.gulp();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment