forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] Clean up the API docs generation scripts (mui#35244)
- Loading branch information
1 parent
83348d4
commit 6196203
Showing
39 changed files
with
311 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// eslint-disable-next-line import/prefer-default-export | ||
export const LANGUAGES: string[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
/** | ||
* Valid languages to server-side render in production | ||
*/ | ||
LANGUAGES: ['en', 'zh', 'pt'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
interface TableOfContentsEntry { | ||
children: TableOfContentsEntry; | ||
hash: string; | ||
level: number; | ||
text: string; | ||
} | ||
|
||
export function createRender(context: { | ||
headingHashes: Record<string, string>; | ||
toc: TableOfContentsEntry[]; | ||
userLanguage: string; | ||
}): (markdown: string) => string; | ||
|
||
export function getHeaders(markdown: string): Record<string, string | string[]>; | ||
|
||
export function getTitle(markdown: string): string; | ||
|
||
export function renderInline(markdown: string): string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default function highlight(code: string, language: string): string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "@mui-internal/api-docs-builder", | ||
"version": "1.0.0", | ||
"private": "true", | ||
"main": "./buildApi.ts", | ||
"scripts": { | ||
"typescript": "tsc -p tsconfig.json" | ||
}, | ||
"dependencies": { | ||
"@babel/core": "^7.20.2", | ||
"@mui-internal/docs-utilities": "*", | ||
"@mui/markdown": "*", | ||
"ast-types": "^0.14.2", | ||
"doctrine": "^3.0.0", | ||
"lodash": "^4.17.21", | ||
"react-docgen": "^5.4.3", | ||
"recast": "^0.21.5", | ||
"typescript-to-proptypes": "*", | ||
"yargs": "^17.6.2" | ||
}, | ||
"devDependencies": { | ||
"@types/mocha": "^10.0.0", | ||
"@types/node": "^18.11.9", | ||
"chai": "^4.3.7", | ||
"sinon": "^14.0.2", | ||
"typescript": "^4.9.3" | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
"noUnusedLocals": true, | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"types": ["node", "mocha"], | ||
"target": "ES2020", | ||
"module": "CommonJS", | ||
"moduleResolution": "node", | ||
"strict": true, | ||
"baseUrl": "./", | ||
"paths": { | ||
"react-docgen": ["./react-docgen.d.ts"] | ||
} | ||
}, | ||
"include": ["./**/*.ts", "./**/*.js"], | ||
"exclude": ["node_modules"] | ||
} |
File renamed without changes.
Oops, something went wrong.