Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
fix(core): Fix canary release by excluding test files from default ts…
Browse files Browse the repository at this point in the history
…config (#5317)

For some reason, test files in the tsconfig are causing package/<component>/index.js not to be generated when running npm run build:esmodules, leading to a failure in the canary release: https://github.com/material-components/material-components-web/runs/340549500
  • Loading branch information
joyzhong authored Dec 9, 2019
1 parent 0ec1fab commit c916008
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 27 deletions.
5 changes: 4 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ const jasmineConfig = {
},
},
},
exclude: [
'scripts/**/*.ts',
],
reports: {
html: 'coverage',
lcovonly: 'coverage',
Expand All @@ -150,7 +153,7 @@ const jasmineConfig = {
filename: 'coverage.json',
},
},
tsconfig: './tsconfig.json',
tsconfig: './tsconfig-base.json',
},
preprocessors: FILES_TO_USE.reduce((obj, file) => {
obj[file] = 'karma-typescript';
Expand Down
26 changes: 26 additions & 0 deletions tsconfig-base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"compilerOptions": {
"declaration": true,
"downlevelIteration": true,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"lib": ["es5", "es6", "dom"],
"moduleResolution": "node",
"newLine": "lf",
"noEmitOnError": false,
"noErrorTruncation": true,
"noFallthroughCasesInSwitch": true,
"noStrictGenericChecks": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"preserveConstEnums": true,
"pretty": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"stripInternal": true,
"target": "es5",
"types": []
}
}
31 changes: 5 additions & 26 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,8 @@
{
"compilerOptions": {
"declaration": true,
"downlevelIteration": true,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"lib": ["es5", "es6", "dom"],
"moduleResolution": "node",
"newLine": "lf",
"noEmitOnError": false,
"noErrorTruncation": true,
"noFallthroughCasesInSwitch": true,
"noStrictGenericChecks": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"preserveConstEnums": true,
"pretty": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"stripInternal": true,
"target": "es5",
"types": []
},
"exclude": [
"scripts/**/*.ts"
]
"packages/**/test/*.ts",
"scripts/**/*.ts",
"testing/**/*.ts"
],
"extends": "./tsconfig-base.json"
}

0 comments on commit c916008

Please sign in to comment.