Created
October 7, 2014 07:53
-
-
Save thebrecht/f55aa613486dcb4ee35c to your computer and use it in GitHub Desktop.
gulpfile for jade/less/livereiload
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//gulpfile.js | |
var gulp = require('gulp'); | |
var jade = require('gulp-jade'); | |
var less = require('gulp-less'); | |
var path = require('path'); | |
var watch = require('gulp-watch'); | |
var livereload = require('gulp-livereload'); | |
gulp.task('jade', function() { | |
gulp.src('./templates/*.jade') | |
.pipe(jade({ | |
pretty: true | |
})) | |
.pipe(gulp.dest('./website/')) | |
.pipe(livereload()) | |
}); | |
gulp.task('less', function() { | |
gulp.src('./less/**/*.less') | |
.pipe(less({ | |
paths: [path.join(__dirname, 'less')] | |
})) | |
.pipe(gulp.dest('./website/css')) | |
.pipe(livereload()) | |
}); | |
gulp.task('watch', function() { | |
gulp.watch('./less/**/*.less', ['less']); | |
gulp.watch('./templates/**/*.jade', ['jade']); | |
}); | |
gulp.task('default', ['watch']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment