UNPKG

turbo-gulp

Version:

Gulp tasks to boost high-quality projects.

82 lines (81 loc) 2.53 kB
export const DEFAULT_PROJECT_TSC_OPTIONS = { allowJs: false, allowSyntheticDefaultImports: true, allowUnreachableCode: false, allowUnusedLabels: false, alwaysStrict: true, baseUrl: undefined, charset: "utf8", checkJs: false, declaration: false, declarationDir: undefined, disableSizeLimit: false, downlevelIteration: false, emitBOM: false, emitDecoratorMetadata: true, esModuleInterop: true, experimentalDecorators: true, forceConsistentCasingInFileNames: true, importHelpers: false, inlineSourceMap: false, inlineSources: false, isolatedModules: false, jsx: undefined, lib: ["es2017", "esnext.asynciterable"], locale: "en-us", mapRoot: undefined, maxNodeModuleJsDepth: undefined, module: "commonjs", moduleResolution: "node", newLine: "lf", noEmit: false, noEmitHelpers: false, noEmitOnError: true, noErrorTruncation: true, noFallthroughCasesInSwitch: true, noImplicitAny: true, noImplicitReturns: true, noImplicitThis: true, noStrictGenericChecks: false, noUnusedLocals: true, noUnusedParameters: false, noImplicitUseStrict: false, noLib: false, noResolve: false, outDir: undefined, outFile: undefined, paths: undefined, preserveConstEnums: false, project: undefined, reactNamespace: undefined, jsxFactory: undefined, removeComments: false, rootDir: undefined, rootDirs: undefined, skipLibCheck: true, sourceMap: true, sourceRoot: undefined, strict: true, strictNullChecks: true, suppressExcessPropertyErrors: false, suppressImplicitAnyIndexErrors: false, target: "es2017", traceResolution: false, types: undefined, typeRoots: undefined, }; export const PROD_TSC_OPTIONS = Object.assign({}, DEFAULT_PROJECT_TSC_OPTIONS, { declaration: true, module: "commonjs", removeComments: false, skipLibCheck: false }); export const DEV_TSC_OPTIONS = Object.assign({}, PROD_TSC_OPTIONS, { noUnusedLocals: false, preserveConstEnums: true, removeComments: false, sourceMap: true }); /** * Merges two typescript compiler options. * The options of `extra` overide the options of `base`. * It does not mutate the arguments. * If `extra` is undefined, returns a shallow copy of `base`. * * @param base Base options * @param extra Additional options * @return The merged TSC options */ export function mergeTscOptionsJson(base, extra) { return Object.assign({}, base, extra); }