-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
42 lines (36 loc) · 1.04 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
var gulp = require("gulp");
var phantom = require("gulp-phantom");
var assemble = require("./assemblefile.js");
var clean = require("gulp-clean");
var watch = require("gulp-watch");
gulp.task('clean', [], function() {
return gulp.src('reports', {read: false})
.pipe(clean());
});
gulp.task('css', ['clean'], function() {
return gulp.src('css/**/*').pipe(gulp.dest('reports/css'));
});
gulp.task('script', ['clean'], function() {
return gulp.src('scripts/**/*').pipe(gulp.dest('reports/scripts'));
});
gulp.task('assemble', ['clean', 'css', 'script'], function() {
return assemble.build(['default'], function(err) {
if (err) throw err;
console.log('done!');
});
});
gulp.task('watch', function() {
return watch('templates/**/*.hbs', function () {
return assemble.build(['default'], function(err) {
if (err) throw err;
console.log('done!');
});
});
});
gulp.task('phantom', function(){
return gulp.src("./phantom/*.js")
.pipe(phantom({
ext: json
}))
.pipe(gulp.dest("./data/"));
})