-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
49 lines (41 loc) · 1 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
var gulp = require('gulp'),
nib = require('nib'),
jade = require('gulp-jade'),
stylus = require('gulp-stylus'),
coffee = require('gulp-coffee'),
concat = require('gulp-concat');
// Jade
gulp.task('jade', function() {
gulp.src('assets/jade/*.jade')
.pipe(jade({
pretty: '\t'
}))
.on('error', console.log)
.pipe(gulp.dest('www'));
});
// Stylus
gulp.task('stylus', function() {
gulp.src('assets/stylus/app.styl')
.pipe(stylus({
use: nib(),
import: 'nib'
}))
.on('error', console.log)
.pipe(gulp.dest('www/css'));
});
// Coffee
gulp.task('coffee', function() {
gulp.src('assets/coffee/*.coffee')
.pipe(coffee({bare: true}).on('error', console.log))
.pipe(concat('app.js'))
.pipe(gulp.dest('www/js'));
});
// Watcher
gulp.task('watch', function() {
// Create file on init
gulp.start('jade', 'stylus', 'coffee');
// Watchers
gulp.watch('assets/jade/**/*.jade', ['jade']);
gulp.watch('assets/stylus/**/*.styl', ['stylus']);
gulp.watch('assets/coffee/*.coffee', ['coffee']);
});