Files
how2ice 005cf56baf
Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
init project
2025-12-12 14:26:25 +09:00

59 lines
2.0 KiB
TypeScript

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 generateUtilityClass, { isGlobalState } from '@mui/utils/generateUtilityClass';
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/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)/) !== null;
},
translationPagesDirectory: 'docs/translations/api-docs',
generateClassName,
isGlobalClassName: isGlobalState,
// #host-reference
baseApiUrl: 'https://mui.com',
pagesManifestPath: path.join(process.cwd(), 'docs/data/material/pages.ts'),
nonComponentFolders: [
'material/getting-started',
'material/customization',
'material/experimental-api',
'material/guides',
'material/integrations',
'material/migration',
],
};