-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
/
Copy pathprojectSettings.ts
57 lines (54 loc) · 1.91 KB
/
projectSettings.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import path from 'path';
import { LANGUAGES } from 'docs/config';
import { ProjectSettings } from '@mui-internal/api-docs-builder';
import findApiPages from '@mui-internal/api-docs-builder/utils/findApiPages';
import {
unstable_generateUtilityClass as generateUtilityClass,
unstable_isGlobalState as isGlobalState,
} from '@mui/utils';
import { getMaterialUiComponentInfo } from './getMaterialUiComponentInfo';
const generateClassName = (componentName: string, slot: string, globalStatePrefix = 'Mui') => {
if (componentName === 'MuiSwipeableDrawer') {
// SwipeableDrawer uses Drawer classes without modifying them
return generateUtilityClass('MuiDrawer', slot, globalStatePrefix);
}
return generateUtilityClass(componentName, slot, globalStatePrefix);
};
export const projectSettings: ProjectSettings = {
output: {
apiManifestPath: path.join(process.cwd(), 'docs/data/material/pagesApi.js'),
},
typeScriptProjects: [
{
name: 'material',
rootPath: path.join(process.cwd(), 'packages/mui-material'),
entryPointPath: [
'src/index.d.ts',
'src/PigmentStack/PigmentStack.tsx',
'src/PigmentContainer/PigmentContainer.tsx',
'src/PigmentHidden/PigmentHidden.tsx',
'src/PigmentGrid/PigmentGrid.tsx',
],
},
{
name: 'lab',
rootPath: path.join(process.cwd(), 'packages/mui-lab'),
entryPointPath: 'src/index.d.ts',
},
],
getApiPages: () => findApiPages('docs/pages/material-ui/api'),
getComponentInfo: getMaterialUiComponentInfo,
translationLanguages: LANGUAGES,
skipComponent(filename: string) {
return (
filename.match(
/(ThemeProvider|CssVarsProvider|DefaultPropsProvider|InitColorSchemeScript)/,
) !== null
);
},
translationPagesDirectory: 'docs/translations/api-docs',
generateClassName,
isGlobalClassName: isGlobalState,
// #default-branch-switch
baseApiUrl: 'https://mui.com',
};