forked from eez-open/studio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
30 lines (25 loc) · 853 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
const gulp = require("gulp");
const terser = require("gulp-terser");
const pump = require("pump");
const SRC = "packages";
const DST = "build";
// copy all from SRC to DST, excluding: *.ts, *.tsx, *.less, ...
gulp.task("copy", function () {
return gulp
.src([
SRC + "/**/*.*",
"!" + SRC + "/project-editor/flow/runtime/cpp/**/*.*",
"!" + SRC + "/**/*.ts",
"!" + SRC + "/**/*.tsx",
"!" + SRC + "/**/*.less",
"!" + SRC + "/tsconfig.json",
"!" + SRC + "/tsconfig.dev.json"
])
.pipe(gulp.dest(DST));
});
// minify all *.js files in DST
gulp.task("minify", function (cb) {
pump([gulp.src(DST + "/**/*.js"), terser(), gulp.dest(DST)], cb);
});
gulp.task("release", gulp.series("copy", "minify"));
gulp.task("debug", gulp.series("copy"));