Skip to content

Commit

Permalink
Factor out tsconfig files, see phetsims/chipper#1463
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Sep 28, 2024
1 parent 3599381 commit 80a4954
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 82 deletions.
10 changes: 1 addition & 9 deletions js/config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
{
"extends": "../../../chipper/tsconfig-node.json",
"include": [
"**/*",
],
"references": [
{
"path": "../../../perennial/tsconfig.json"
}
]
"extends": "../../tsconfig-node.json"
}
16 changes: 1 addition & 15 deletions js/grunt/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
{
"extends": "../../../chipper/tsconfig-node.json",
"include": [
"**/*"
],
"references": [
{
"path": "../../../perennial/tsconfig.json"
},
{
"path": "../server/tsconfig.json"
},
{
"path": "../node-client/tsconfig.json"
}
]
"extends": "../../tsconfig-node.json"
}
10 changes: 1 addition & 9 deletions js/local/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
{
"extends": "../../../chipper/tsconfig-node.json",
"include": [
"**/*",
],
"references": [
{
"path": "../../../perennial/tsconfig.json"
}
]
"extends": "../../tsconfig-node.json"
}
10 changes: 1 addition & 9 deletions js/node-client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
{
"extends": "../../../chipper/tsconfig-node.json",
"include": [
"**/*",
],
"references": [
{
"path": "../../../perennial/tsconfig.json"
}
]
"extends": "../../tsconfig-node.json"
}
10 changes: 1 addition & 9 deletions js/server/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
{
"extends": "../../../chipper/tsconfig-node.json",
"include": [
"**/*",
],
"references": [
{
"path": "../../../perennial/tsconfig.json"
}
]
"extends": "../../tsconfig-node.json"
}
14 changes: 1 addition & 13 deletions js/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
{
// This is the tsconfig for browser files, for node files, see within each node-like subdirectory.
"extends": "../../chipper/tsconfig-core.json",
"include": [
"browser-tools/**/*",
"client/**/*",
"report/**/*",
"*"
],
"references": [
{
"path": "../../chipper/tsconfig/buildjson/tsconfig.json"
}
]
"extends": "../tsconfig-browser.json"
}
15 changes: 15 additions & 0 deletions tsconfig-browser.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// This is the tsconfig for browser files, for node files, see within each node-like subdirectory.
"extends": "../chipper/tsconfig-core.json",
"include": [
"browser-tools/**/*",
"client/**/*",
"report/**/*",
"*"
],
"references": [
{
"path": "../chipper/tsconfig/buildjson/tsconfig.json"
}
]
}
15 changes: 15 additions & 0 deletions tsconfig-node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "../chipper/tsconfig-node.json",
"include": [
"js/config/**/*",
"js/grunt/**/*",
"js/local/**/*",
"js/node-client/**/*",
"js/server/**/*"
],
"references": [
{
"path": "../perennial/tsconfig.json"
}
]
}
25 changes: 7 additions & 18 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
{
// NOTE we do not extend tsconfig-core.json. This is a composite just for referencing the individual typescript sub-
// projects within this repo.

// By default, TypeScript includes all files below the tsconfig.json location. However, we must override that to
// blank it out, so that we can let each browser/node decide what they want to include.
"files": [],
"references": [

// BROWSER
{
"path": "js/tsconfig.json"
},

// NODE
{
"path": "js/config/tsconfig.json"
},
{
"path": "js/grunt/tsconfig.json"
},
{
"path": "js/local/tsconfig.json"
},
{
"path": "js/node-client/tsconfig.json"
"path": "tsconfig-browser.json"
},
{
"path": "js/server/tsconfig.json"
"path": "tsconfig-node.json"
}
]
}

0 comments on commit 80a4954

Please sign in to comment.