-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
49 lines (39 loc) · 1.19 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
'use strict';
var path = require('path');
var gulp = require('gulp');
var del = require('del');
var typescript = require('typescript');
var buildTools = require('via-build-tools');
var locations = new buildTools.config.Locations({
root: path.resolve(__dirname)
});
buildTools.tasks.build(gulp, locations, {
tsc: {
typescript: typescript,
forceConsistentCasingInFileNames: true,
allowSyntheticDefaultImports: true
}
});
buildTools.tasks.install(gulp, locations);
buildTools.tasks.project(gulp, locations);
buildTools.tasks.test(gulp, locations);
gulp.task('build.browser.assets', function(){
return gulp.src([
'src/browser/**/*.css',
'src/browser/**/*.html',
'src/browser/**/*.jpg',
'src/browser/**/*.png'
], {base: 'src/browser'})
.pipe(gulp.dest('build/browser'));
});
gulp.task("build.browser", ["build.browser.systemjs", "build.browser.assets"]);
gulp.task("build", ["build.browser", "build.node"]);
gulp.task('clean.node', function () {
return del(['build/node/**/*']);
});
gulp.task('clean.browser', function () {
return del(['build/browser/**/*', 'build/systemjs/**/*']);
});
gulp.task('clean', function () {
return del(['build/**/*']);
});