Skip to content

Commit 20d13e2

Browse files
committed
Prepare proptypes-builder for publishing
1 parent d666e92 commit 20d13e2

File tree

14 files changed

+105
-39
lines changed

14 files changed

+105
-39
lines changed

.codesandbox/ci.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"packages/mui-types",
2121
"packages/mui-utils",
2222
"packages/docs-utils",
23+
"packages/proptypes-builder",
2324
"packages/typescript-to-proptypes"
2425
],
2526
"publishDirectory": {
@@ -40,6 +41,7 @@
4041
"@mui/types": "packages/mui-types/build",
4142
"@mui/utils": "packages/mui-utils/build",
4243
"@mui-internal/docs-utils": "packages/docs-utils",
44+
"@mui-internal/proptypes-builder": "packages/proptypes-builder",
4345
"@mui-internal/typescript-to-proptypes": "packages/typescript-to-proptypes"
4446
},
4547
"sandboxes": [

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"scripts": {
66
"preinstall": "npx only-allow pnpm",
7-
"proptypes": "tsx ./scripts/generateProptypes.ts",
7+
"proptypes": "nx run scripts:proptypes",
88
"deduplicate": "pnpm dedupe",
99
"benchmark:browser": "pnpm --filter benchmark browser",
1010
"build": "lerna run --scope \"@mui/*\" build",
@@ -222,5 +222,6 @@
222222
],
223223
"sourceMap": false,
224224
"instrument": false
225-
}
225+
},
226+
"nx": {}
226227
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
## 1.0.0
4+
5+
Initial release as an npm package.

packages/proptypes-builder/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# @mui-internal/proptypes-builder
2+
3+
A utility to create prop types based on TS definitions in MUI codebase.
4+
This is an internal package not meant for general use.
5+
6+
## Release
7+
8+
1. Build the project: `pnpm build`
9+
2. Publish the build artifacts to npm: `pnpm release:publish`
Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
11
{
22
"name": "@mui-internal/proptypes-builder",
33
"version": "1.0.0",
4-
"private": "true",
5-
"main": "./index.ts",
4+
"author": "MUI Team",
5+
"description": "A utility to create prop types based on TS definitions in MUI codebase. This is an internal package not meant for general use.",
6+
"main": "./build/index.js",
7+
"exports": {
8+
".": "./build/index.js"
9+
},
10+
"types": "./build/index.d.ts",
11+
"repository": {
12+
"type": "git",
13+
"url": "https://github.com/mui/material-ui.git",
14+
"directory": "packages/proptypes-builder"
15+
},
616
"scripts": {
7-
"typescript": "tsc -p tsconfig.json"
17+
"prebuild": "rimraf ./build",
18+
"build": "tsc -b tsconfig.build.json",
19+
"typescript": "tsc -b tsconfig.json",
20+
"release:publish": "pnpm publish --tag latest",
21+
"release:publish:dry-run": "pnpm publish --tag latest --registry=\"http://localhost:4873/\""
822
},
923
"dependencies": {
10-
"@mui-internal/api-docs-builder": "workspace:^",
1124
"@mui-internal/docs-utils": "workspace:^",
1225
"@mui-internal/typescript-to-proptypes": "workspace:^",
1326
"fast-glob": "^3.3.2",
1427
"fs-extra": "^11.2.0",
1528
"prettier": "^2.8.8"
1629
},
1730
"devDependencies": {
31+
"rimraf": "^5.0.5",
1832
"typescript": "^5.3.3"
1933
}
2034
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"rootDir": "./src",
5+
"outDir": "./build",
6+
"declaration": true,
7+
"noEmit": false,
8+
"composite": true,
9+
"tsBuildInfoFile": "./build/.tsbuildinfo",
10+
"target": "ES2020",
11+
"module": "commonjs",
12+
"types": ["node"]
13+
}
14+
}
Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
{
22
"compilerOptions": {
3-
"allowJs": true,
4-
"isolatedModules": true,
53
"noEmit": true,
6-
"noUnusedLocals": false,
7-
"resolveJsonModule": true,
8-
"skipLibCheck": true,
9-
"esModuleInterop": true,
10-
"types": ["node", "mocha"],
11-
"target": "ES2020",
12-
"module": "CommonJS",
134
"moduleResolution": "node",
5+
"types": ["node", "mocha"],
146
"strict": true,
15-
"baseUrl": "./",
16-
"paths": {
17-
"react-docgen": ["./react-docgen.d.ts"]
18-
}
7+
"esModuleInterop": true,
8+
"isolatedModules": true
199
},
20-
"include": ["./**/*.ts", "./**/*.js"],
21-
"exclude": ["node_modules"]
10+
"include": ["./src/*.ts", "./test/*.ts"],
11+
"references": [
12+
{ "path": "../docs-utils/tsconfig.build.json" },
13+
{ "path": "../typescript-to-proptypes/tsconfig.build.json" }
14+
]
2215
}

0 commit comments

Comments
 (0)