-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gulpfile.js
39 lines (30 loc) · 1.21 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
var gulp = require('gulp'),
gutil = require('gulp-util'),
jade = require('gulp-jade'),
concat = require('gulp-concat'),
streamqueue = require('streamqueue'),
templateCache = require('gulp-angular-templatecache');
gulp.task('build', function () {
var compileFairyTemplates = gulp.src('src/guideFairies/templates/**/*.jade')
.pipe(jade({}).on('error', gutil.log))
.pipe(templateCache({module: 'guide-fairies'}));
var compileFairyJs = gulp.src('src/guideFairies/guide-fairies.js');
streamqueue({ objectMode: true }, compileFairyJs, compileFairyTemplates)
.pipe(concat('guide-fairies.js'))
.pipe(gulp.dest('dist'));
gulp.src('src/demoApp/templates/**/*.jade')
.pipe(jade({}).on('error', gutil.log))
.pipe(templateCache())
.pipe(gulp.dest('demo'));
gulp.src('src/demoApp/**/*.css')
.pipe(concat('styles.css'))
.pipe(gulp.dest('demo'));
gulp.src('src/demoApp/demoApp.js')
.pipe(gulp.dest('demo/js'));
gulp.src('./src/demoApp/index.jade')
.pipe(jade({}).on('error', gutil.log))
.pipe(gulp.dest('demo'));
});
gulp.task('dev', ['build'], function () {
gulp.watch(['src/**/*'], ['build']);
});