Skip to content

Commit

Permalink
Use typescript incremental builds
Browse files Browse the repository at this point in the history
Until microsoft/TypeScript#30661 is fixed we can't do incremental builds
with --noEmit so this sets an outDir for all typescript projects that
don't already have one.
  • Loading branch information
rudolf committed Sep 27, 2019
1 parent 721b5d0 commit 450d182
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 8 deletions.
1 change: 1 addition & 0 deletions packages/kbn-analytics/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"compilerOptions": {
"declaration": true,
"declarationDir": "./target/types",
"outDir": "../../build/.cache/packages/kbn-analytics",
"stripInternal": true,
"declarationMap": true,
"types": [
Expand Down
5 changes: 4 additions & 1 deletion packages/kbn-es/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"extends": "../../tsconfig.json",
"include": [
"src/**/*.ts"
]
],
"compilerOptions": {
"outDir": "../../build/.cache/packages/kbn-es"
}
}
5 changes: 4 additions & 1 deletion packages/kbn-expect/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"extends": "../../tsconfig.json",
"include": [
"expect.js.d.ts"
]
],
"compilerOptions": {
"outDir": "../../build/.cache/packages/kbn-expect"
}
}
1 change: 1 addition & 0 deletions packages/kbn-i18n/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"target"
],
"compilerOptions": {
"outDir": "../../build/.cache/packages/kbn-i18n",
"declaration": true,
"declarationDir": "./target/types",
"types": [
Expand Down
5 changes: 4 additions & 1 deletion packages/kbn-interpreter/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.json",
"include": ["index.d.ts", "src/**/*.d.ts"]
"include": ["index.d.ts", "src/**/*.d.ts"],
"compilerOptions": {
"outDir": "../../build/.cache/packages/kbn-interpreter"
}
}
1 change: 1 addition & 0 deletions packages/kbn-pm/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"./src/**/*.ts",
],
"compilerOptions": {
"outDir": "../../build/.cache/packages/kbn-pm",
"types": [
"jest",
"node"
Expand Down
3 changes: 3 additions & 0 deletions packages/kbn-test-subj-selector/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
"include": [
"index.d.ts"
],
"compilerOptions": {
"outDir": "../../build/.cache/packages/kbn-test-subj-selector"
}
}
5 changes: 4 additions & 1 deletion packages/kbn-test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
"types/**/*",
"src/functional_test_runner/**/*",
"src/mocha/xml.ts"
]
],
"compilerOptions": {
"outDir": "../../build/.cache/packages/kbn-test"
}
}
2 changes: 1 addition & 1 deletion src/dev/typescript/run_type_check_cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function runTypeCheckCli() {
process.exit();
}

const tscArgs = ['--noEmit', '--pretty', ...(opts['skip-lib-check'] ? ['--skipLibCheck'] : [])];
const tscArgs = ['--pretty', ...(opts['skip-lib-check'] ? ['--skipLibCheck'] : [])];
const projects = filterProjectsByFlag(opts.project);

if (!projects.length) {
Expand Down
1 change: 1 addition & 0 deletions test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../build/.cache/test",
"types": [
"node",
"mocha"
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"compilerOptions": {
"incremental": true,
"outDir": "build/.cache/kibana",
"baseUrl": ".",
"paths": {
// Allows for importing from `kibana` package for the exported types.
Expand Down Expand Up @@ -67,5 +69,5 @@
// file, but if we did it during development IDEs would not be able to find
// the tsconfig.json file for public files correctly.
// "src/**/public/**/*"
]
],
}
1 change: 1 addition & 0 deletions x-pack/legacy/plugins/apm/cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"exclude": [],
"include": ["./**/*"],
"compilerOptions": {
"outDir": "../../../../../build/.cache/apm/cypress",
"types": ["cypress", "node"]
}
}
3 changes: 2 additions & 1 deletion x-pack/legacy/plugins/siem/cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
"./**/*"
],
"compilerOptions": {
"outDir": "../../../../../build/.cache/siem/cypress",
"types": [
"cypress",
"node"
]
}
}
}
1 change: 1 addition & 0 deletions x-pack/test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../build/.cache/x-pack/test",
"types": [
"mocha",
"node"
Expand Down
2 changes: 1 addition & 1 deletion x-pack/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"**/typespec_tests.ts"
],
"compilerOptions": {
"outDir": ".",
"outDir": "../build/.cache/x-pack",
"paths": {
"kibana/public": ["src/core/public"],
"kibana/server": ["src/core/server"],
Expand Down

0 comments on commit 450d182

Please sign in to comment.