Add binary extension. (#3)

This commit is contained in:
Yaohai Zheng 2017-09-11 16:49:45 +08:00 committed by GitHub
parent 8434cc28e5
commit 2dc3a4975f
4 changed files with 156 additions and 120 deletions

View File

@ -4,5 +4,6 @@ out/test/**
test/** test/**
src/** src/**
**/*.map **/*.map
.gitignore
tsconfig.json tsconfig.json
gulpfile.js
.gitignore

View File

@ -1,8 +1,28 @@
const gulp = require("gulp"); const gulp = require("gulp");
const cp = require('child_process');
const tslint = require("gulp-tslint"); const tslint = require("gulp-tslint");
const copy = require("gulp-copy");
const server_dir = '../java-debug';
gulp.task("tslint", () => { gulp.task("tslint", () => {
return gulp.src(["**/*.ts", "!**/*.d.ts", "!node_modules/**", "!./src/views/node_modules/**"]) return gulp.src(["**/*.ts", "!**/*.d.ts", "!node_modules/**", "!./src/views/node_modules/**"])
.pipe(tslint()) .pipe(tslint())
.pipe(tslint.report()); .pipe(tslint.report());
}); });
gulp.task('build_server', () => {
cp.execSync(mvnw() + ' clean package', {
cwd: server_dir,
stdio: [0, 1, 2]
});
gulp.src(server_dir + '/com.microsoft.java.debug.plugin/target/com.microsoft.java.debug.*.jar')
.pipe(copy('./server', {
prefix: 4
}))
.pipe(gulp.dest('.'));
});
function mvnw() {
return "mvn";
}

15
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "vscode-java-debugger", "name": "vscode-java-debug",
"version": "0.0.1", "version": "0.1.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -1208,6 +1208,17 @@
"through2": "2.0.3" "through2": "2.0.3"
} }
}, },
"gulp-copy": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/gulp-copy/-/gulp-copy-1.0.1.tgz",
"integrity": "sha512-uhIdHo9SoWkf+pjfjETOMD/6ez10ZItO5/L1bFRfVGH+7lq9zE3TSjkh3WVPuTS9ttPRHA7yW4g1QRE1hPwUOA==",
"dev": true,
"requires": {
"gulp": "3.9.1",
"gulp-util": "3.0.8",
"through2": "2.0.3"
}
},
"gulp-filter": { "gulp-filter": {
"version": "5.0.1", "version": "5.0.1",
"resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-5.0.1.tgz", "resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-5.0.1.tgz",

View File

@ -15,9 +15,10 @@
], ],
"main": "./out/src/extension", "main": "./out/src/extension",
"contributes": { "contributes": {
"javaExtensions": [], "javaExtensions": ["./server/com.microsoft.java.debug.plugin-0.1.0-SNAPSHOT.jar"],
"commands": [], "commands": [],
"debuggers": [{ "debuggers": [
{
"type": "java", "type": "java",
"label": "Java", "label": "Java",
"startSessionCommand": "vscode.java.startDebugSession", "startSessionCommand": "vscode.java.startDebugSession",
@ -106,7 +107,8 @@
} }
} }
}, },
"initialConfigurations": [{ "initialConfigurations": [
{
"type": "java", "type": "java",
"name": "Debug (Launch)", "name": "Debug (Launch)",
"request": "launch", "request": "launch",
@ -128,7 +130,8 @@
] ]
} }
] ]
}] }
]
}, },
"scripts": { "scripts": {
"vscode:prepublish": "tsc -p ./", "vscode:prepublish": "tsc -p ./",
@ -143,6 +146,7 @@
"@types/mocha": "^2.2.32", "@types/mocha": "^2.2.32",
"@types/node": "^6.0.40", "@types/node": "^6.0.40",
"gulp": "^3.9.1", "gulp": "^3.9.1",
"gulp-copy": "^1.0.1",
"gulp-tslint": "^8.1.2", "gulp-tslint": "^8.1.2",
"mocha": "^2.3.3", "mocha": "^2.3.3",
"tslint": "^5.7.0", "tslint": "^5.7.0",