-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
68 lines (62 loc) · 1.92 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");
var browserify = require("browserify");
var source = require('vinyl-source-stream');
var tsify = require("tsify");
gulp.task("copy-html-game", function () {
return gulp.src(['game/*.html'])
.pipe(gulp.dest("dist/game"));
});
gulp.task("copy-html-user", function () {
return gulp.src(['user/*.html']).pipe(gulp.dest('dist'))
});
gulp.task("copy-image", function () {
return gulp.src(['img/*']).pipe(gulp.dest("dist/game/img"));
});
gulp.task('copy-css', function () {
return gulp.src(['css/*']).pipe(gulp.dest("dist/game/css"));
});
gulp.task("default",
gulp.series(gulp.parallel('copy-html-game'),
gulp.parallel('copy-html-user'),
gulp.parallel('copy-image'),
gulp.parallel('copy-css'),
function () {
return browserify({
basedir: '.',
debug: true,
entries: ['typescript/main.ts'],
cache: {},
packageCache: {}
})
.plugin(tsify)
.bundle()
.pipe(source('bundle.js'))
.pipe(gulp.dest("dist/game/script"));
},
function () {
return browserify({
basedir: '.',
debug: true,
entries: ['typescript/startscreen.ts'],
cache: {},
packageCache: {}
})
.plugin(tsify)
.bundle()
.pipe(source('start.bundle.js'))
.pipe(gulp.dest("dist/game/script"));
},
function () {
return browserify({
basedir: '.',
debug: true,
entries: ['typescript/cockpit.ts'],
cache: {},
packageCache: {}
})
.plugin(tsify)
.bundle()
.pipe(source('cockpit.bundle.js'))
.pipe(gulp.dest("dist/game/script"));
}
));