-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathgulpfile.js
39 lines (31 loc) · 887 Bytes
/
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
/* File: gulpfile.js */
// grab our gulp packages
var gulp = require('gulp'),
gutil = require('gulp-util'),
include = require('gulp-include'),
jshint = require('gulp-jshint'),
print = require('gulp-print'),
jsGlob = [
'*.js',
'gulpfile.js',
'src/**/*.js'
];
gulp.task("examples", function(){
console.log('-- Building examples ');
gulp.src('src/templates/*.html')
.pipe(print())
.pipe(include())
.on('error',console.log)
.pipe(gulp.dest('examples'));
});
// create a default task and just log a message
gulp.task('default', ['examples']);
// gutil.log('Gulp is running!')
gulp.task('jshint', function() {
return gulp.src( jsGlob )
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'));
});
gulp.task('watch', function() {
gulp.watch( jsGlob , ['jshint']);
});