Skip to content

Instantly share code, notes, and snippets.

@winwu
Created May 7, 2014 06:21
Show Gist options
  • Save winwu/8963a06fb46b1dc39eb2 to your computer and use it in GitHub Desktop.
Save winwu/8963a06fb46b1dc39eb2 to your computer and use it in GitHub Desktop.
// Gulpfile.js
// Require the needed packages
var gulp = require('gulp');
var stylus = require('gulp-stylus');
var watch = require('gulp-watch');
// Get and render all .styl files recursively
gulp.task('stylus', function () {
gulp.src('app/views/assets/resources/stylus/**/*.styl')
.pipe(watch(function(files){
console.log('done!');
return files.pipe(stylus({errors: true}))
.pipe(gulp.dest('public/assets/css/'));
}));
});
// Default gulp task to run
gulp.task('default', ['stylus']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment