-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
107 lines (95 loc) · 2.43 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
"use strict";
var gulp = require("gulp");
var del = require("del");
var typescript = require("gulp-typescript");
var merge = require("merge-stream");
var path = require("path");
var glob = require("glob");
gulp.task("clean", function (cb) {
return glob("./**/*.ts", function (err, files) {
var generatedFiles = files.map(function (file) {
return file.replace(/.ts$/, ".js*");
});
del(generatedFiles, cb);
});
});
gulp.task("build:InstallMailApp", function () {
var tsProject = typescript.createProject("./InstallMailApp/tsconfig.json");
return tsProject
.src()
.pipe(tsProject())
.pipe(
gulp.dest(function (file) {
return file.base;
})
);
});
gulp.task("build:UninstallMailApp", function () {
var tsProject = typescript.createProject("./UninstallMailApp/tsconfig.json");
return tsProject
.src()
.pipe(tsProject())
.pipe(
gulp.dest(function (file) {
return file.base;
})
);
});
gulp.task(
"watch:InstallMailApp",
gulp.series("build:InstallMailApp", () => {
gulp.watch("./InstallMailApp/**/*.ts", gulp.series("build:InstallMailApp"));
})
);
gulp.task(
"watch:UninstallMailApp",
gulp.series("build:UninstallMailApp", () => {
gulp.watch(
"./UninstallMailApp/**/*.ts",
gulp.series("build:UninstallMailApp")
);
})
);
gulp.task(
"watch",
gulp.series("watch:InstallMailApp", "watch:UninstallMailApp")
);
gulp.task("package:clean", () => {
return del(["package/*/**"]);
});
gulp.task(
"package:copy",
gulp.series("package:clean", () => {
return gulp
.src(
[
"./extension-icon*.png",
"LICENSE",
"PRIVACY.md",
"README.md",
"vss-extension.json",
"package.json",
"docs/**/*",
"**/*.xsd",
"**/*.wsdl",
"./InstallMailApp/**/*.js",
"./InstallMailApp/package.json",
"./InstallMailApp/task.json",
"./InstallMailApp/icon.png",
"./UninstallMailApp/**/*.js",
"./UninstallMailApp/package.json",
"./UninstallMailApp/task.json",
"./UninstallMailApp/icon.png",
"!**/node_modules/**/*",
],
{ base: "." }
)
.pipe(gulp.dest("./package"));
})
);
gulp.task("package", gulp.series("package:copy"));
gulp.task(
"build",
gulp.series("build:InstallMailApp", "build:UninstallMailApp")
);
gulp.task("default", gulp.series("build"));