提交 402106a6 编写于 作者: M Matt Bierner

Introduce a shared tsconfig for extensions

Setup a baseline tsconfig for extensions to extend. This will help make sure thatof our built-in extensions are using the recommended settings for target and so on. it also reduces duplicated code and will make updating tsconfig settings easier
上级 199c51f4
......@@ -21,6 +21,7 @@ const nlsDev = require('vscode-nls-dev');
const root = path.dirname(__dirname);
const commit = util.getVersion(root);
const plumber = require('gulp-plumber');
const _ = require('underscore');
const extensionsPath = path.join(path.dirname(__dirname), 'extensions');
......@@ -35,7 +36,9 @@ const tasks = compilations.map(function (tsconfigFile) {
const absolutePath = path.join(extensionsPath, tsconfigFile);
const relativeDirname = path.dirname(tsconfigFile);
const tsOptions = require(absolutePath).compilerOptions;
const tsconfig = require(absolutePath);
const tsOptions = _.assign({}, tsconfig.compilerOptions, tsconfig.extends ? require(path.join(extensionsPath, relativeDirname, tsconfig.extends)).compilerOptions : {});
tsOptions.verbose = false;
tsOptions.sourceMap = true;
......
{
"compilerOptions": {
"target": "es2017",
"module": "commonjs",
"lib": [
"es6",
"es2015.promise"
],
"strict": true,
"alwaysStrict": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true
}
}
\ No newline at end of file
{
"extends": "../shared.tsconfig.json",
"compilerOptions": {
"target": "es2017",
"module": "commonjs",
"lib": [
"es6",
"es2015.promise"
],
"outDir": "./out",
"noImplicitAny": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true,
"alwaysStrict": true,
"experimentalDecorators": true
},
"include": [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册