Skip to content

Commit f5cbcfb

Browse files
authored
feat(package): add tsconfig pkg to share across packages in monorepo (#380)
* add tsconfig pkg to share across packages in monorepo * fixed docs build * acknowledged PR comments
1 parent 2a4590e commit f5cbcfb

File tree

13 files changed

+89
-38
lines changed

13 files changed

+89
-38
lines changed

apps/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"license": "Apache-2.0",
66
"scripts": {
7-
"dev": "next dev --port 3001",
7+
"dev": "next dev --turbo --port 3001",
88
"build": "next build",
99
"start": "next start",
1010
"postinstall": "fumadocs-mdx"

apps/docs/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@
3434
"content/docs/connections/index.mdx"
3535
],
3636
"exclude": ["node_modules"]
37-
}
37+
}

apps/sim/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"private": true,
55
"license": "Apache-2.0",
66
"type": "module",
7+
"packageManager": "bun@1.2.12",
78
"engines": {
89
"bun": ">=1.2.13",
910
"node": ">=20.0.0"
@@ -134,7 +135,8 @@
134135
"tailwindcss": "^3.4.1",
135136
"typescript": "^5.7.3",
136137
"vite-tsconfig-paths": "^5.1.4",
137-
"vitest": "^3.0.8"
138+
"vitest": "^3.0.8",
139+
"@simstudio/tsconfig": "workspace:*"
138140
},
139141
"lint-staged": {
140142
"*.{js,jsx,ts,tsx,json,css,scss,md}": [

apps/sim/tsconfig.json

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
{
2+
"extends": "@simstudio/tsconfig/nextjs.json",
23
"compilerOptions": {
3-
"target": "es2020",
4-
"module": "esnext",
5-
"moduleResolution": "bundler",
6-
"lib": ["es2020", "dom", "dom.iterable"],
7-
"strict": true,
8-
"esModuleInterop": true,
9-
"skipLibCheck": true,
10-
"forceConsistentCasingInFileNames": true,
114
"baseUrl": ".",
125
"paths": {
136
"@/*": ["./*"],
@@ -28,19 +21,7 @@
2821
"@/db/*": ["./db/*"],
2922
"@/executor": ["./executor"],
3023
"@/executor/*": ["./executor/*"]
31-
},
32-
"allowJs": true,
33-
"noEmit": true,
34-
"incremental": true,
35-
"resolveJsonModule": true,
36-
"isolatedModules": true,
37-
"allowImportingTsExtensions": true,
38-
"jsx": "preserve",
39-
"plugins": [
40-
{
41-
"name": "next"
42-
}
43-
]
24+
}
4425
},
4526
"include": [
4627
"**/*.ts",

bun.lock

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simstudio",
3-
"packageManager": "bun@1.2.12",
3+
"packageManager": "bun@1.2.13",
44
"version": "0.0.0",
55
"private": true,
66
"license": "Apache-2.0",

packages/simstudio/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"devDependencies": {
3838
"@types/inquirer": "^8.2.6",
3939
"@types/node": "^20.5.1",
40-
"typescript": "^5.1.6"
40+
"typescript": "^5.1.6",
41+
"@simstudio/tsconfig": "workspace:*"
4142
},
4243
"engines": {
4344
"node": ">=16"

packages/simstudio/tsconfig.json

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
{
2+
"extends": "@simstudio/tsconfig/library.json",
23
"compilerOptions": {
3-
"target": "es2020",
4-
"module": "ESNext",
5-
"moduleResolution": "node",
64
"outDir": "./dist",
7-
"rootDir": "./src",
8-
"strict": true,
9-
"esModuleInterop": true,
10-
"skipLibCheck": true,
11-
"declaration": true,
12-
"forceConsistentCasingInFileNames": true
5+
"rootDir": "./src"
136
},
14-
"include": ["src/**/*"],
15-
"exclude": ["node_modules", "dist"]
7+
"include": ["src/**/*"]
168
}

packages/tsconfig/base.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://json.schemastore.org/tsconfig",
3+
"display": "Default",
4+
"compilerOptions": {
5+
"target": "es2020",
6+
"module": "esnext",
7+
"moduleResolution": "bundler",
8+
"lib": ["es2020", "dom", "dom.iterable"],
9+
"strict": true,
10+
"esModuleInterop": true,
11+
"skipLibCheck": true,
12+
"forceConsistentCasingInFileNames": true,
13+
"allowJs": true,
14+
"noEmit": true,
15+
"incremental": true,
16+
"resolveJsonModule": true,
17+
"isolatedModules": true,
18+
"jsx": "preserve"
19+
},
20+
"exclude": ["node_modules", "dist", ".next"]
21+
}

packages/tsconfig/library.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://json.schemastore.org/tsconfig",
3+
"display": "Library",
4+
"extends": "./base.json",
5+
"compilerOptions": {
6+
"module": "ESNext",
7+
"moduleResolution": "node",
8+
"declaration": true,
9+
"noEmit": false
10+
},
11+
"exclude": ["node_modules", "dist"]
12+
}

0 commit comments

Comments
 (0)