Skip to content

Commit

Permalink
feat(typescript): add typescript project references
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherthielen committed Sep 28, 2021
1 parent 798721a commit 39f6611
Show file tree
Hide file tree
Showing 17 changed files with 137 additions and 134 deletions.
10 changes: 6 additions & 4 deletions packages/amazon/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"extends": "../tsconfig.app.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
"rootDir": "./src",
"composite": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["**/*.spec.*"]
"exclude": ["**/*.spec.*"],
"extends": "../tsconfig.app.base.json",
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js"],
"references": [{ "path": "../core/tsconfig.json" }]
}
19 changes: 16 additions & 3 deletions packages/app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,21 @@
"compilerOptions": {
"baseUrl": "./src",
"outDir": "dist",
"rootDir": "./src"
"rootDir": "./src",
"composite": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["**/*.spec.*"]
"exclude": ["**/*.spec.*"],
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js"],
"references": [
{ "path": "../amazon/tsconfig.json" },
{ "path": "../appengine/tsconfig.json" },
{ "path": "../cloudfoundry/tsconfig.json" },
{ "path": "../core/tsconfig.json" },
{ "path": "../docker/tsconfig.json" },
{ "path": "../ecs/tsconfig.json" },
{ "path": "../google/tsconfig.json" },
{ "path": "../kubernetes/tsconfig.json" },
{ "path": "../oracle/tsconfig.json" },
{ "path": "../titus/tsconfig.json" }
]
}
10 changes: 6 additions & 4 deletions packages/appengine/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"extends": "../tsconfig.app.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
"rootDir": "./src",
"composite": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["**/*.spec.*"]
"exclude": ["**/*.spec.*"],
"extends": "../tsconfig.app.base.json",
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js"],
"references": [{ "path": "../core/tsconfig.json" }]
}
10 changes: 6 additions & 4 deletions packages/azure/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"extends": "../tsconfig.app.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
"rootDir": "./src",
"composite": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["**/*.spec.*"]
"exclude": ["**/*.spec.*"],
"extends": "../tsconfig.app.base.json",
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js"],
"references": [{ "path": "../core/tsconfig.json" }]
}
10 changes: 6 additions & 4 deletions packages/cloudfoundry/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"extends": "../tsconfig.app.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
"rootDir": "./src",
"composite": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["**/*.spec.*"]
"exclude": ["**/*.spec.*"],
"extends": "../tsconfig.app.base.json",
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js"],
"references": [{ "path": "../core/tsconfig.json" }]
}
10 changes: 6 additions & 4 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"extends": "../tsconfig.app.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
"rootDir": "./src",
"composite": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["**/*.spec.*", "**/*.stories.*"]
"exclude": ["**/*.spec.*", "**/*.stories.*"],
"extends": "../tsconfig.app.base.json",
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js"],
"references": [{ "path": "../presentation/tsconfig.json" }]
}
10 changes: 6 additions & 4 deletions packages/dcos/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"extends": "../tsconfig.app.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
"rootDir": "./src",
"composite": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["**/*.spec.*"]
"exclude": ["**/*.spec.*"],
"extends": "../tsconfig.app.base.json",
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js"],
"references": [{ "path": "../core/tsconfig.json" }, { "path": "../docker/tsconfig.json" }]
}
10 changes: 6 additions & 4 deletions packages/docker/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"extends": "../tsconfig.app.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
"rootDir": "./src",
"composite": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["**/*.spec.*"]
"exclude": ["**/*.spec.*"],
"extends": "../tsconfig.app.base.json",
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js"],
"references": [{ "path": "../core/tsconfig.json" }]
}
14 changes: 10 additions & 4 deletions packages/ecs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
{
"extends": "../tsconfig.app.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
"rootDir": "./src",
"composite": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["**/*.spec.*"]
"exclude": ["**/*.spec.*"],
"extends": "../tsconfig.app.base.json",
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js"],
"references": [
{ "path": "../amazon/tsconfig.json" },
{ "path": "../core/tsconfig.json" },
{ "path": "../docker/tsconfig.json" }
]
}
10 changes: 6 additions & 4 deletions packages/google/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"extends": "../tsconfig.app.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
"rootDir": "./src",
"composite": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["**/*.spec.*"]
"exclude": ["**/*.spec.*"],
"extends": "../tsconfig.app.base.json",
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js"],
"references": [{ "path": "../core/tsconfig.json" }]
}
10 changes: 6 additions & 4 deletions packages/huaweicloud/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"extends": "../tsconfig.app.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
"rootDir": "./src",
"composite": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["**/*.spec.*"]
"exclude": ["**/*.spec.*"],
"extends": "../tsconfig.app.base.json",
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js"],
"references": [{ "path": "../core/tsconfig.json" }]
}
10 changes: 6 additions & 4 deletions packages/kubernetes/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"extends": "../tsconfig.app.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
"rootDir": "./src",
"composite": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["**/*.spec.*"]
"exclude": ["**/*.spec.*"],
"extends": "../tsconfig.app.base.json",
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js"],
"references": [{ "path": "../core/tsconfig.json" }]
}
10 changes: 6 additions & 4 deletions packages/oracle/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"extends": "../tsconfig.app.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
"rootDir": "./src",
"composite": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["**/*.spec.*"]
"exclude": ["**/*.spec.*"],
"extends": "../tsconfig.app.base.json",
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js"],
"references": [{ "path": "../core/tsconfig.json" }]
}
10 changes: 6 additions & 4 deletions packages/presentation/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"extends": "../tsconfig.tools.base.json",
"exclude": ["dist"],
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"strict": true
}
"strict": true,
"composite": true
},
"exclude": ["dist"],
"extends": "../tsconfig.tools.base.json",
"references": []
}
10 changes: 6 additions & 4 deletions packages/tencentcloud/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"extends": "../tsconfig.app.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
"rootDir": "./src",
"composite": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["**/*.spec.*"]
"exclude": ["**/*.spec.*"],
"extends": "../tsconfig.app.base.json",
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js"],
"references": [{ "path": "../core/tsconfig.json" }]
}
14 changes: 10 additions & 4 deletions packages/titus/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
{
"extends": "../tsconfig.app.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
"rootDir": "./src",
"composite": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["**/*.spec.*"]
"exclude": ["**/*.spec.*"],
"extends": "../tsconfig.app.base.json",
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js"],
"references": [
{ "path": "../amazon/tsconfig.json" },
{ "path": "../core/tsconfig.json" },
{ "path": "../docker/tsconfig.json" }
]
}
94 changes: 23 additions & 71 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,73 +1,25 @@
{
"buildOnSave": false,
"compileOnSave": true,
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"baseUrl": "app/scripts/modules",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"jsx": "react",
"lib": ["es2017", "dom", "ES2018.Promise"],
"moduleResolution": "node",
"module": "esnext",
"noEmitHelpers": false,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": false, // should really get to a place where we can turn this on
"noUnusedLocals": true,
"noUnusedParameters": true,
"outDir": "transpiled",
"paths": {
"@spinnaker/core": ["core/src"],
"core/*": ["core/src/*"],
"core": ["core/src"],
"@spinnaker/docker": ["docker/src"],
"docker/*": ["docker/src/*"],
"docker": ["docker/src"],
"@spinnaker/amazon": ["amazon/src"],
"amazon/*": ["amazon/src/*"],
"amazon": ["amazon/src"],
"@spinnaker/google": ["google/src"],
"google/*": ["google/src/*"],
"google": ["google/src"],
"@spinnaker/appengine": ["appengine/src"],
"appengine/*": ["appengine/src/*"],
"appengine/": ["appengine/src"],
"@spinnaker/kubernetes": ["kubernetes/src"],
"kubernetes/*": ["kubernetes/src/*"],
"kubernetes/": ["kubernetes/src"],
"@spinnaker/oracle": ["oracle/src"],
"oracle/*": ["oracle/src/*"],
"oracle": ["oracle/src"],
"@spinnaker/cloudfoundry": ["cloudfoundry/src"],
"cloudfoundry/*": ["cloudfoundry/src/*"],
"cloudfoundry/": ["cloudfoundry/src"],
"@spinnaker/titus": ["titus/src"],
"titus/*": ["titus/src/*"],
"titus/": ["titus/src"],
"@spinnaker/huaweicloud": ["huaweicloud/src"],
"huaweicloud/*": ["huaweicloud/src/*"],
"huaweicloud": ["huaweicloud/src"],
"@spinnaker/tencentcloud": ["tencentcloud/src"],
"tencentcloud/*": ["tencentcloud/src/*"],
"tencentcloud": ["tencentcloud/src"],
"@spinnaker/azure": ["azure/src"],
"azure/*": ["azure/src/*"],
"azure": ["azure/src"],
"@spinnaker/ecs": ["ecs/src"],
"ecs/*": ["ecs/src/*"],
"ecs": ["ecs/src"]
},
"pretty": true,
"removeComments": false,
"rootDir": ".",
"skipLibCheck": true,
"sourceMap": true,
"strictNullChecks": false, // should really get to a place where we can turn this on
"target": "es6",
"typeRoots": ["node_modules/@types"]
},
"exclude": ["build", "node", "node_modules", "transpiled", "**/*.stories.*"],
"include": ["test/helpers/custom-matchers.d.ts", "app/scripts/modules/**/*.ts", "app/scripts/modules/**/*.tsx"]
// This top-level tsconfig.json builds all the referenced paths (Typescript project references)
// https://www.typescriptlang.org/docs/handbook/project-references.html
// build: tsc -b
// watch: tsc -b -w
"files": [],
"references": [
{ "path": "packages/app/tsconfig.json" },
{ "path": "packages/amazon/tsconfig.json" },
{ "path": "packages/appengine/tsconfig.json" },
{ "path": "packages/azure/tsconfig.json" },
{ "path": "packages/cloudfoundry/tsconfig.json" },
{ "path": "packages/core/tsconfig.json" },
{ "path": "packages/dcos/tsconfig.json" },
{ "path": "packages/docker/tsconfig.json" },
{ "path": "packages/ecs/tsconfig.json" },
{ "path": "packages/google/tsconfig.json" },
{ "path": "packages/huaweicloud/tsconfig.json" },
{ "path": "packages/kubernetes/tsconfig.json" },
{ "path": "packages/oracle/tsconfig.json" },
{ "path": "packages/presentation/tsconfig.json" },
{ "path": "packages/tencentcloud/tsconfig.json" },
{ "path": "packages/titus/tsconfig.json" }
]
}

0 comments on commit 39f6611

Please sign in to comment.