Skip to content

Commit

Permalink
skip demo for InitColorSchemeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Jun 14, 2024
1 parent 1b3cd47 commit c11fb6b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions packages/api-docs-builder-core/joyUi/projectSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ export const projectSettings: ProjectSettings = {
// Container's demo isn't ready
// GlobalStyles's demo isn't ready
return (
filename.match(/(ThemeProvider|CssVarsProvider|Container|ColorInversion|GlobalStyles)/) !==
null
filename.match(
/(ThemeProvider|CssVarsProvider|Container|ColorInversion|GlobalStyles|InitColorSchemeScript)/,
) !== null
);
},
translationPagesDirectory: 'docs/translations/api-docs-joy',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const projectSettings: ProjectSettings = {
getComponentInfo: getMaterialUiComponentInfo,
translationLanguages: LANGUAGES,
skipComponent(filename: string) {
return filename.match(/(ThemeProvider|CssVarsProvider|Grid2)/) !== null;
return filename.match(/(ThemeProvider|CssVarsProvider|InitColorSchemeScript|Grid2)/) !== null;
},
translationPagesDirectory: 'docs/translations/api-docs',
generateClassName: generateUtilityClass,
Expand Down
4 changes: 3 additions & 1 deletion packages/api-docs-builder-core/muiSystem/projectSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export const projectSettings: ProjectSettings = {
getComponentInfo: getSystemComponentInfo,
translationLanguages: LANGUAGES,
skipComponent(filename) {
return filename.match(/(ThemeProvider|CssVarsProvider|GlobalStyles)/) !== null;
return (
filename.match(/(ThemeProvider|CssVarsProvider|GlobalStyles|InitColorSchemeScript)/) !== null
);
},
translationPagesDirectory: 'docs/translations/api-docs',
generateClassName: generateUtilityClass,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ export default async function generateComponentApi(
throw new Error(
'Unable to find demos. \n' +
`Be sure to include \`components: ${reactApi.name}\` in the markdown pages where the \`${reactApi.name}\` component is relevant. ` +
'Every public component should have a demo. ',
'Every public component should have a demo.\nFor internal component, add the name of the component to the `skipComponent` method of the product.',
);
}

Expand Down

0 comments on commit c11fb6b

Please sign in to comment.