Last active
February 27, 2016 18:51
-
-
Save julienhay/0f450f60dc1f6ddd707f to your computer and use it in GitHub Desktop.
Gulp file intégration ES => Jade + Compass + Watch
This file contains 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'), | |
compass = require('gulp-compass'), | |
jade = require('gulp-jade'), | |
watch = require('gulp-watch'); | |
var integration_folder = 'web/integration/'; | |
var assets_folder = integration_folder+'assets/'; | |
function error(message) { | |
console.log("Error : "+message.toString()); | |
} | |
gulp.task('compass', function() { | |
gulp.src(assets_folder+'sass/**/*.scss') | |
.pipe(compass({ | |
config_file: assets_folder+'config.rb', | |
css: assets_folder+'css/', | |
sass: assets_folder+'sass/', | |
image: assets_folder+'images/', | |
})) | |
.on('error', error) | |
.pipe(gulp.dest(assets_folder+'css/')); | |
}); | |
gulp.task('jade', function() { | |
gulp.src(integration_folder+'views/jade/**/*.jade') | |
.pipe(jade({ | |
pretty: true | |
})) | |
.on('error', error) | |
.pipe(gulp.dest(integration_folder+'views/twig/')) | |
}); | |
gulp.task('watch', ['compass', 'jade'], function () { | |
gulp.watch(assets_folder+'/sass/**/*.scss', ['compass']); | |
gulp.watch(integration_folder+'/views/jade/**/*.jade', ['jade']); | |
}); | |
gulp.task('default', ['watch']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment