Skip to content

Instantly share code, notes, and snippets.

@julienhay
Last active February 27, 2016 18:51
Show Gist options
  • Save julienhay/0f450f60dc1f6ddd707f to your computer and use it in GitHub Desktop.
Save julienhay/0f450f60dc1f6ddd707f to your computer and use it in GitHub Desktop.
Gulp file intégration ES => Jade + Compass + Watch
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