Skip to content

Instantly share code, notes, and snippets.

@ninjaPixel
Created September 4, 2015 17:13
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 ninjaPixel/b2da669b68238009e644 to your computer and use it in GitHub Desktop.
Save ninjaPixel/b2da669b68238009e644 to your computer and use it in GitHub Desktop.
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