-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathgulpfile.js
40 lines (33 loc) · 928 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
40
var gulp = require('gulp');
var ts = require('gulp-typescript');
var createTemplateCache = require('gulp-angular-templatecache');
var concat = require('gulp-concat');
var less = require('gulp-less');
var streamqueue = require('streamqueue');
gulp.task('default', ['build']);
gulp.task('watch', function() {
return gulp.watch('src/**', ['build'])
});
gulp.task('build', ['compile', 'less']);
gulp.task('compile', function () {
streamqueue({ objectMode: true }, compile(), templateCache())
.pipe(concat('tileview.js'))
.pipe(gulp.dest('dist'));
});
gulp.task('less', function() {
return gulp.src('src/**/*.less')
.pipe(less())
.pipe(gulp.dest('dist'));
});
function compile() {
return gulp.src('src/**/*.ts')
.pipe(ts({
//noImplicitAny: true
}));
}
function templateCache() {
return gulp.src('src/**/*.tpl.html')
.pipe(createTemplateCache({
module: 'td.tileview'
}));
}