Skip to content

Instantly share code, notes, and snippets.

@auggod
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save auggod/9b650bd38767188039d8 to your computer and use it in GitHub Desktop.
Save auggod/9b650bd38767188039d8 to your computer and use it in GitHub Desktop.
gulpfile
var gulp = require('gulp')
, jade = require('gulp-jade')
, stylus = require('gulp-stylus')
, livereload = require('gulp-livereload')
, autoprefixer = require('autoprefixer-stylus');
gulp.task('templates', function() {
return gulp.src('./index.jade')
.pipe(jade({
pretty: true
}))
.pipe(gulp.dest('./'))
.pipe(livereload());
});
gulp.task('stylus', function () {
gulp.src('./styles/stylus/app.styl')
.pipe(stylus({
use: [autoprefixer('iOS >= 7', 'last 1 Chrome version')]
}))
.pipe(gulp.dest('./styles/css'))
.pipe(livereload());
});
gulp.task('watch', function () {
livereload.listen();
gulp.watch('./*.jade',['templates']);
gulp.watch('./styles/stylus/**/*.styl',['stylus']);
});
// Default Task
gulp.task('default', ['templates', 'stylus', 'watch']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment