-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
68 lines (56 loc) · 1.78 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
var gulp = require('gulp'),
del = require('del'),
$ = require('gulp-load-plugins')( {lazy:true} ),
sourcemaps = require('gulp-sourcemaps'),
ts = require('gulp-tsc'),
webpack = require('webpack-stream');
var dest = '.release';
var paths = {
e2eTs: ['test/e2e/**/*.ts'],
e2eJs: ['test/e2e/**/*.js']
};
var destpath = 'test/e2e/';
gulp.task('clean:release', function(doneCb) {
return del(dest, doneCb);
});
gulp.task('build:server', function() {
return gulp.src(['server/server.js', 'package.json', 'server/web.config', 'server/config.js'])
.pipe(gulp.dest(dest));
});
gulp.task('build:html', function() {
return gulp.src(['**/*.html', '!node_modules', '!node_modules/**'])
.pipe(gulp.dest(dest));
});
gulp.task('build:frontend', function() {
return gulp.src('./app/boot.ts')
.pipe($.webpack( require('./webpack.ci.config.js')))
.pipe(gulp.dest(dest + '/app'));
});
gulp.task('package-create', function() {
});
gulp.task('build:release', ['build:server', 'build:frontend','build:html']);
gulp.task('build:package', function() {
return gulp.src(dest + '/**')
.pipe($.zip('package.zip'))
.pipe(gulp.dest(dest));
});
gulp.task('compileE2e', function () {
return gulp.src(paths.e2eTs)
//.pipe(sourcemaps.init())
.pipe(ts({
module: "commonjs",
target: "es5",
noImplicitAny: false,
outDir: "dist",
rootDir: ".",
sourceMap: false,
moduleResolution: "node",
experimentalDecorators: true,
emitDecoratorMetadata: true
}))
//.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(destpath))
});
gulp.task('cleanE2e', function (doneCb) {
return del(paths.e2eJs, doneCb);
});