Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat project references #549

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,7 @@ dist

# TernJS port file
.tern-port

# IDEs
.vscode
.idea
3 changes: 0 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,6 @@ async function init() {
path: './nightwatch/tsconfig.json'
})
}
if (needsNightwatchCT) {
render('tsconfig/nightwatch-ct')
}
fs.writeFileSync(
path.resolve(root, 'tsconfig.json'),
JSON.stringify(rootTsConfig, null, 2) + '\n',
Expand Down
5 changes: 3 additions & 2 deletions template/tsconfig/base/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",

"noEmit": false,
"emitDeclarationOnly": true,
"outDir": "./node_modules/.tmp/app",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
Expand Down
6 changes: 3 additions & 3 deletions template/tsconfig/base/tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
],
"compilerOptions": {
"composite": true,
"noEmit": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",

"noEmit": false,
"emitDeclarationOnly": true,
"outDir": "./node_modules/.tmp/node",
"module": "ESNext",
"moduleResolution": "Bundler",
"types": ["node"]
Expand Down
20 changes: 13 additions & 7 deletions template/tsconfig/cypress-ct/tsconfig.cypress-ct.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
{
"extends": "./tsconfig.app.json",
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": [
"env.d.ts",
"src/**/*",
"src/**/*.vue",
"src/**/__tests__/*",
"cypress/support/component.*",
"cypress/support/commands.ts"
],
"exclude": [],
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.cypress-ct.tsbuildinfo"
}
"noEmit": false,
"emitDeclarationOnly": true,
"outDir": "./node_modules/.tmp/cypress-ct",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not strictly necessary to have the declarations output for anything but the tsconfig.app.json right now, but I think it makes sense to make them all work the same way.

Copy link

@codethief codethief Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Besides, whether or not declarations will be output will change slightly in TypeScript 5.6, see microsoft/TypeScript#32651 (comment)

"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
},
"references": [
{ "path": "./tsconfig.app.json" }
]
}
14 changes: 0 additions & 14 deletions template/tsconfig/nightwatch-ct/tsconfig.app.json

This file was deleted.

18 changes: 13 additions & 5 deletions template/tsconfig/vitest/tsconfig.vitest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
{
"extends": "./tsconfig.app.json",
"exclude": [],
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["src/**/__tests__/*"],
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.vitest.tsbuildinfo",

"noEmit": false,
"emitDeclarationOnly": true,
"outDir": "./node_modules/.tmp/vitest",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
"lib": [],
"types": ["node", "jsdom"]
}
},
"references": [
{ "path": "./tsconfig.app.json" }
]
}