forked from microsoft/vscode-java-debug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
36 lines (29 loc) · 864 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
const gulp = require("gulp");
const cp = require('child_process');
const tslint = require("gulp-tslint");
const server_dir = '../java-debug';
gulp.task("tslint", () => {
return gulp.src(["**/*.ts", "!**/*.d.ts", "!node_modules/**", "!./src/views/node_modules/**"])
.pipe(tslint())
.pipe(tslint.report());
});
gulp.task('build_server', () => {
cp.execSync(mvnw() + ' clean package', {
cwd: server_dir,
stdio: [0, 1, 2]
});
return gulp.src(server_dir + '/com.microsoft.java.debug.plugin/target/com.microsoft.java.debug.*.jar')
.pipe(gulp.dest('./server'));
});
function isWin() {
return /^win/.test(process.platform);
}
function isMac() {
return /^darwin/.test(process.platform);
}
function isLinux() {
return /^linux/.test(process.platform);
}
function mvnw() {
return isWin() ? "mvnw.cmd" : "./mvnw";
}