Created
September 4, 2015 17:13
-
-
Save ninjaPixel/b2da669b68238009e644 to your computer and use it in GitHub Desktop.
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
var gulp = require('gulp'), | |
less = require('gulp-less'), | |
path = require('path'), | |
jade = require('gulp-jade'), | |
livereload = require('gulp-livereload'); | |
var MY_LOCALS = {errLogToConsole: true}; | |
gulp.task('default', function() { | |
// place code for your default task here | |
}); | |
gulp.task('less', function () { | |
return gulp.src('./less/**/*.less') | |
.pipe(less()) | |
.on('error', function (err) { | |
// util.log(err.message); | |
this.emit('end'); | |
}) | |
.pipe(gulp.dest('./src/css')) | |
.pipe(livereload());; | |
}); | |
gulp.task('jade', function() { | |
gulp.src('./jade/**/*.jade') | |
.pipe(jade() | |
.on('error', function(err) { | |
// | |
console.log('jade error:',err); | |
this.emit('end'); | |
}) | |
) | |
.pipe(gulp.dest('./src')) | |
.pipe(livereload());; | |
}); | |
gulp.task('move', function(){ | |
gulp.src('./jade/templates/*.html') | |
.pipe(gulp.dest('./public')); | |
}); | |
gulp.task('watch', ['build'], function() { | |
// gulp.watch(['./less/**/*.less', './jade/*.html', './jade/**/*.jade'], ['build']); | |
gulp.watch(['less/**/*.less', 'jade/**/*.jade'], ['build']); | |
}); | |
gulp.task('build', ['less', 'jade']); | |
livereload.listen(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment