Skip to content
This repository was archived by the owner on Apr 9, 2021. It is now read-only.

Commit 41ae56a

Browse files
committed
build.js: fix build script
vscode-html-languageserver's tsconfig changed. It extends `../../shared.tsconfig.json` that is `https://github.com/microsoft/vscode/blob/master/extensions/shared.tsconfig.json` now. So I copy and use shared.tsconfig.json. I don't want to keep up with changes in shared.tsconfig.json, but I couldn't think of any other easy way. The submodule directory has also been changed to match the relative path of extends in tsconfig.json.
1 parent b796f6f commit 41ae56a

File tree

4 files changed

+19
-10
lines changed

4 files changed

+19
-10
lines changed

build.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,14 @@ const throwIfError = res => {
1111

1212
console.log(green(`Installing ${cyan('vscode-html-languageserver')} dependencies`));
1313
throwIfError(spawnSync('npm', ['install'], {
14-
cwd: join(__dirname, 'vscode-html-languageserver'),
14+
cwd: join(__dirname, 'submodule/vscode-html-languageserver'),
1515
stdio: 'inherit'
1616
}));
1717

1818
console.log(green(`Compiling ${cyan('vscode-html-languageserver')}`));
19-
const tsconfig = require('./vscode-html-languageserver/tsconfig.json')
2019
throwIfError(spawnSync('tsc', [
21-
'-p', 'vscode-html-languageserver',
20+
'-p', 'submodule/vscode-html-languageserver',
2221
'--outDir', 'dist',
23-
'--lib', tsconfig.compilerOptions.lib.concat(['dom']).join(','),
24-
'--target', tsconfig.compilerOptions.target,
2522
'--listEmittedFiles'
2623
], {
2724
cwd: __dirname,
@@ -39,7 +36,7 @@ writeFileSync(file, lines.join('\n'), 'utf8')
3936

4037
console.log(green(`Merging package.json files`));
4138
const currentPackage = require('./package.json');
42-
const HTMLLSPackage = require('./vscode-html-languageserver/package.json');
39+
const HTMLLSPackage = require('./submodule/vscode-html-languageserver/package.json');
4340

4441
writeFileSync(join(__dirname, 'dist', 'package.json'), JSON.stringify(Object.assign(HTMLLSPackage, currentPackage, {
4542
scripts: {},

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
"chalk": "^2.3.0"
2626
},
2727
"dependencies": {
28-
"typescript": "^2.9.1"
28+
"typescript": "^3.7.3"
2929
}
3030
}

shared.tsconfig.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es2018",
4+
"module": "commonjs",
5+
"strict": true,
6+
"alwaysStrict": true,
7+
"noImplicitAny": true,
8+
"noImplicitReturns": true,
9+
"noUnusedLocals": true,
10+
"noUnusedParameters": true
11+
}
12+
}

0 commit comments

Comments
 (0)