Refactor: optimize build script (#389)
Signed-off-by: Yan Zhang <yanzh@microsoft.com>
This commit is contained in:
Родитель
0a2dfc8285
Коммит
f027a7bdb0
14
.travis.yml
14
.travis.yml
|
@ -6,14 +6,15 @@ node_js:
|
|||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
|
||||
before_install:
|
||||
- if [ $TRAVIS_OS_NAME == "linux" ]; then
|
||||
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0;
|
||||
sh -e /etc/init.d/xvfb start;
|
||||
sleep 3;
|
||||
fi
|
||||
- |
|
||||
if [ $TRAVIS_OS_NAME == "linux" ]; then
|
||||
export CXX="g++-4.9" CC="gcc-4.9"
|
||||
export DISPLAY=':99.0'
|
||||
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
install:
|
||||
- npm install
|
||||
|
@ -21,3 +22,4 @@ install:
|
|||
script:
|
||||
- npm run tslint
|
||||
- npm run compile
|
||||
- npm run build-plugin
|
||||
|
|
|
@ -11,3 +11,7 @@ TestPlan.md
|
|||
webpack.*.js
|
||||
node_modules
|
||||
out/**
|
||||
javaConfig.json
|
||||
gulpfile.js
|
||||
jdtls.ext/**
|
||||
!jdtls.ext/com.microsoft.java.maven.plugin/target/com.microsoft.java.maven.plugin-*.jar
|
||||
|
|
|
@ -6,10 +6,8 @@ const cp = require('child_process');
|
|||
const path = require('path');
|
||||
const serverDir = path.join(__dirname, 'jdtls.ext');
|
||||
|
||||
gulp.task('build_server', (done) => {
|
||||
gulp.task('build-plugin', (done) => {
|
||||
cp.execSync(`${mvnw()} clean package`, { cwd: serverDir, stdio: [0, 1, 2] });
|
||||
gulp.src(path.join(serverDir, 'com.microsoft.java.maven.plugin/target/*.jar'))
|
||||
.pipe(gulp.dest('./server'));
|
||||
done();
|
||||
});
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
"main": "./dist/extension",
|
||||
"contributes": {
|
||||
"javaExtensions": [
|
||||
"./server/com.microsoft.java.maven.plugin-0.1.0.jar"
|
||||
"./jdtls.ext/com.microsoft.java.maven.plugin/target/com.microsoft.java.maven.plugin-0.1.0.jar"
|
||||
],
|
||||
"commands": [
|
||||
{
|
||||
|
@ -514,7 +514,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"vscode:prepublish": "webpack --mode production",
|
||||
"postinstall": "npx gulp build_server",
|
||||
"build-plugin": "gulp build-plugin",
|
||||
"compile": "tsc -p ./",
|
||||
"tslint": "tslint -t verbose src/**/*.ts --project tslint.json",
|
||||
"watch": "webpack --mode development --watch --info-verbosity verbose",
|
||||
|
|
Загрузка…
Ссылка в новой задаче