Compare commits

...

8 Commits

Author SHA1 Message Date
da823e51d5 2.1.56 2022-03-15 20:06:48 +01:00
b68aa06941 fix(core): update 2022-03-15 20:06:48 +01:00
f5ee2c2c70 2.1.55 2022-03-15 10:21:15 +01:00
0c018e6448 fix(core): update 2022-03-15 10:21:15 +01:00
565c66e4e6 2.1.54 2022-03-15 10:18:09 +01:00
72ad77446c fix(core): update 2022-03-15 10:18:08 +01:00
59ce28395f 2.1.53 2022-03-15 10:04:59 +01:00
cddd7ffd25 fix(core): update 2022-03-15 10:04:59 +01:00
4 changed files with 9 additions and 20 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@gitzone/tsbuild",
"version": "2.1.52",
"version": "2.1.56",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@gitzone/tsbuild",
"version": "2.1.52",
"version": "2.1.56",
"license": "MIT",
"dependencies": {
"@pushrocks/early": "^3.0.6",

View File

@ -1,6 +1,6 @@
{
"name": "@gitzone/tsbuild",
"version": "2.1.52",
"version": "2.1.56",
"private": false,
"description": "TypeScript nightly to easily make use of latest features",
"main": "dist_ts/index.js",

View File

@ -16,17 +16,12 @@ export const compilerOptionsDefault: CompilerOptions = {
module: plugins.typescript.ModuleKind.ES2020,
target: plugins.typescript.ScriptTarget.ES2020,
moduleResolution: plugins.typescript.ModuleResolutionKind.Node12,
lib: [],
lib: ['lib.dom.d.ts'],
noImplicitAny: true,
esModuleInterop: true,
importsNotUsedAsValues: plugins.typescript.ImportsNotUsedAsValues.Preserve
};
export const compilerOptionsWebDefault: CompilerOptions = {
...compilerOptionsDefault,
lib: [...compilerOptionsDefault.lib, 'lib.dom.d.ts']
};
/**
* merges compilerOptions with the default compiler options
*/
@ -34,17 +29,9 @@ export const mergeCompilerOptions = (
customTsOptions: CompilerOptions,
argvArg?: any
): CompilerOptions => {
const defaultOptionsToMerge = (() => {
if (argvArg && argvArg.web) {
return compilerOptionsWebDefault;
} else {
return compilerOptionsDefault;
}
})();
// create merged options
const mergedOptions: CompilerOptions = {
...defaultOptionsToMerge,
...compilerOptionsDefault,
...customTsOptions,
...argvArg && argvArg.skiplibcheck ? {
skipLibCheck: true
@ -54,10 +41,12 @@ export const mergeCompilerOptions = (
} : {},
...argvArg && argvArg.commonjs ? {
module: plugins.typescript.ModuleKind.CommonJS,
moduleResolution: plugins.typescript.ModuleResolutionKind.Classic,
moduleResolution: plugins.typescript.ModuleResolutionKind.NodeJs,
} : {},
};
console.log(mergedOptions)
return mergedOptions;
};

View File

@ -38,7 +38,7 @@ export const runCli = async () => {
},
{},
process.cwd(),
{ web: true }
{ web: true, ...argvArg },
);
});