Skip to content

Instantly share code, notes, and snippets.

@alejandrobernardis
Created December 14, 2014 20:24
Show Gist options
  • Save alejandrobernardis/c27aabdfe16b33676005 to your computer and use it in GitHub Desktop.
Save alejandrobernardis/c27aabdfe16b33676005 to your computer and use it in GitHub Desktop.
Gulp + Stylus (watcher)
var gulp = require('gulp');
var stylus = require('gulp-stylus');
var browser_sync = require('browser-sync');
var reload = browser_sync.reload;
gulp.task('stylus', function() {
return gulp.src('./static/css/*.styl')
.pipe(stylus())
.pipe(gulp.dest('./static/css'))
.pipe(reload({ stream:true }));
});
gulp.task('serve', function() {
browser_sync({
server: {
baseDir: './'
}
});
gulp.watch('./static/css/*.styl', ['stylus']);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment