Skip to content

Instantly share code, notes, and snippets.

@erikfloresq
Created August 16, 2014 16:58
Show Gist options
  • Save erikfloresq/dfbc460f9e6f253268cb to your computer and use it in GitHub Desktop.
Save erikfloresq/dfbc460f9e6f253268cb to your computer and use it in GitHub Desktop.
Gulp File básico para arrancar proyecto con stylus jade y coffee
var gulp = require('gulp');
var coffee = require('gulp-coffee');
var jade = require('gulp-jade');
var stylus = require('gulp-stylus');
var jeet = require('jeet');
var rupture = require('rupture');
var gutil = require('gulp-util');
var paths ={
jades : ['./precom/jade/*.jade'],
scripts : ['./precom/coffee/*.coffee'],
stylus : ['./precom/stylus/*.styl']
}
gulp.task('jade', function() {
var YOUR_LOCALS = {};
gulp.src(paths.jades)
.pipe(jade({
locals: YOUR_LOCALS,
pretty: true
}))
.pipe(gulp.dest('./'))
});
gulp.task('coffee', function() {
gulp.src(paths.scripts)
.pipe(coffee({bare: true}).on('error', gutil.log))
.pipe(gulp.dest('./js/'))
});
gulp.task('stylus', function () {
return gulp.src(paths.stylus)
.pipe(stylus({use: [jeet(),rupture()]}))
.pipe(gulp.dest('./css'))
});
gulp.task('compile', ['jade', 'stylus','coffee']);
gulp.task('watch',function(){
gulp.watch(paths.jades,['jade']);
gulp.watch(paths.stylus,['stylus']);
gulp.watch(paths.coffee,['coffee']);
});
gulp.task('default',['jade','stylus','coffee']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment