Skip to content

Commit af4773b

Browse files
committed
fix: type generation
1 parent ececa56 commit af4773b

File tree

6 files changed

+39
-6
lines changed

6 files changed

+39
-6
lines changed

bun.lock

Lines changed: 19 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: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@
2020
],
2121
"version": "0.0.0-development",
2222
"scripts": {
23-
"types": "tsc -p tsconfig.json",
23+
"types": "bun run types:md-gen && bun run types:plugin",
2424
"lint": "eslint .",
2525
"lint:fix": "eslint . --fix",
2626
"build:md-gen": "bun run --cwd packages/markdown-generator build.ts",
27-
"build:plugin": "bun run --cwd packages/docusaurus-plugin build.ts"
27+
"build:plugin": "bun run --cwd packages/docusaurus-plugin build.ts",
28+
"types:md-gen": "bun run --cwd packages/markdown-generator tsc -p tsconfig.json",
29+
"types:plugin": "bun run --cwd packages/docusaurus-plugin tsc -p tsconfig.json"
2830
},
2931
"devDependencies": {
3032
"@eslint/js": "^9.39.1",

packages/docusaurus-plugin/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
"@open-rpc/schema-utils-js": "^2.1.2"
2424
},
2525
"devDependencies": {
26-
"@docusaurus/types": "3.9.2"
26+
"@docusaurus/types": "3.9.2",
27+
"@types/react": "^19.2.4",
28+
"@types/react-dom": "^19.2.3"
2729
},
2830
"peerDependencies": {
2931
"react": "^19.0.0",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module "*.module.css" {
2+
const classes: { [key: string]: string };
3+
export default classes;
4+
}

packages/docusaurus-plugin/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"strict": true,
1414
"skipLibCheck": true,
1515
"esModuleInterop": true,
16+
"jsx": "react-jsx",
1617
"forceConsistentCasingInFileNames": true,
1718
"resolveJsonModule": true
1819
},
@@ -22,6 +23,7 @@
2223
"exclude": [
2324
"node_modules",
2425
"packages/example-site",
25-
"dist"
26+
"dist",
27+
"build.ts"
2628
]
2729
}

packages/markdown-generator/tsconfig.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,10 @@
3232
"noUnusedLocals": false,
3333
"noUnusedParameters": false,
3434
"noPropertyAccessFromIndexSignature": false
35-
}
35+
},
36+
"exclude": [
37+
"node_modules",
38+
"dist",
39+
"build.ts"
40+
]
3641
}

0 commit comments

Comments
 (0)