-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
45 lines (40 loc) · 973 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
41
42
43
44
45
const babel = require("gulp-babel"),
browserify = require("browserify"),
gulp = require("gulp"),
rename = require("gulp-rename"),
source = require("vinyl-source-stream"),
ts = require("gulp-typescript");
const tsProject = ts.createProject("tsconfig.json");
gulp.task("default", function()
{
return tsProject.src()
.pipe(tsProject()).js
.pipe(babel({
"presets": [
"es2015"
]
}))
.pipe(gulp.dest("dist"));
});
gulp.task("demo", [
"www"
], function()
{
return gulp
.src("./www.js")
.pipe(rename("ren2.js"))
.pipe(gulp.dest("./demo/"));
});
gulp.task("www", [
"default"
], function()
{
return browserify("./dist/app/www.js", {
"paths": [
"dist"
]
})
.bundle()
.pipe(source("www.js"))
.pipe(gulp.dest("."));
});