Skip to content

Commit

Permalink
[code-infra] Add options to docs-api generation to support X code str…
Browse files Browse the repository at this point in the history
…ucture (#40111)

Signed-off-by: Matheus Wichman <matheushw@outlook.com>
Signed-off-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Co-authored-by: Matheus Wichman <matheushw@outlook.com>
  • Loading branch information
3 people authored and mnajdova committed Jan 9, 2024
1 parent 40f7812 commit 0868fce
Show file tree
Hide file tree
Showing 243 changed files with 616 additions and 507 deletions.
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/accordion-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/accordion-details',
false,
/accordion-details.*.json$/,
/\.\/accordion-details.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/accordion-group.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/accordion-group',
false,
/accordion-group.*.json$/,
/\.\/accordion-group.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/accordion-summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/accordion-summary',
false,
/accordion-summary.*.json$/,
/\.\/accordion-summary.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/accordion',
false,
/accordion.*.json$/,
/\.\/accordion.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Page(props) {
}

Page.getInitialProps = () => {
const req = require.context('docs/translations/api-docs-joy/alert', false, /alert.*.json$/);
const req = require.context('docs/translations/api-docs-joy/alert', false, /\.\/alert.*.json$/);
const descriptions = mapApiPageTranslations(req);

return {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/aspect-ratio.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/aspect-ratio',
false,
/aspect-ratio.*.json$/,
/\.\/aspect-ratio.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/autocomplete-listbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/autocomplete-listbox',
false,
/autocomplete-listbox.*.json$/,
/\.\/autocomplete-listbox.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/autocomplete-option.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/autocomplete-option',
false,
/autocomplete-option.*.json$/,
/\.\/autocomplete-option.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/autocomplete',
false,
/autocomplete.*.json$/,
/\.\/autocomplete.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/avatar-group.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/avatar-group',
false,
/avatar-group.*.json$/,
/\.\/avatar-group.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Page(props) {
}

Page.getInitialProps = () => {
const req = require.context('docs/translations/api-docs-joy/avatar', false, /avatar.*.json$/);
const req = require.context('docs/translations/api-docs-joy/avatar', false, /\.\/avatar.*.json$/);
const descriptions = mapApiPageTranslations(req);

return {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Page(props) {
}

Page.getInitialProps = () => {
const req = require.context('docs/translations/api-docs-joy/badge', false, /badge.*.json$/);
const req = require.context('docs/translations/api-docs-joy/badge', false, /\.\/badge.*.json$/);
const descriptions = mapApiPageTranslations(req);

return {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/box.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Page(props) {
}

Page.getInitialProps = () => {
const req = require.context('docs/translations/api-docs-joy/box', false, /box.*.json$/);
const req = require.context('docs/translations/api-docs-joy/box', false, /\.\/box.*.json$/);
const descriptions = mapApiPageTranslations(req);

return {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/breadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/breadcrumbs',
false,
/breadcrumbs.*.json$/,
/\.\/breadcrumbs.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/button-group.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/button-group',
false,
/button-group.*.json$/,
/\.\/button-group.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Page(props) {
}

Page.getInitialProps = () => {
const req = require.context('docs/translations/api-docs-joy/button', false, /button.*.json$/);
const req = require.context('docs/translations/api-docs-joy/button', false, /\.\/button.*.json$/);
const descriptions = mapApiPageTranslations(req);

return {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/card-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/card-actions',
false,
/card-actions.*.json$/,
/\.\/card-actions.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/card-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/card-content',
false,
/card-content.*.json$/,
/\.\/card-content.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/card-cover.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/card-cover',
false,
/card-cover.*.json$/,
/\.\/card-cover.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/card-overflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/card-overflow',
false,
/card-overflow.*.json$/,
/\.\/card-overflow.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/card.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Page(props) {
}

Page.getInitialProps = () => {
const req = require.context('docs/translations/api-docs-joy/card', false, /card.*.json$/);
const req = require.context('docs/translations/api-docs-joy/card', false, /\.\/card.*.json$/);
const descriptions = mapApiPageTranslations(req);

return {
Expand Down
6 changes: 5 additions & 1 deletion docs/pages/joy-ui/api/checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ export default function Page(props) {
}

Page.getInitialProps = () => {
const req = require.context('docs/translations/api-docs-joy/checkbox', false, /checkbox.*.json$/);
const req = require.context(
'docs/translations/api-docs-joy/checkbox',
false,
/\.\/checkbox.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

return {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/chip-delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/chip-delete',
false,
/chip-delete.*.json$/,
/\.\/chip-delete.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/chip.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Page(props) {
}

Page.getInitialProps = () => {
const req = require.context('docs/translations/api-docs-joy/chip', false, /chip.*.json$/);
const req = require.context('docs/translations/api-docs-joy/chip', false, /\.\/chip.*.json$/);
const descriptions = mapApiPageTranslations(req);

return {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/circular-progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/circular-progress',
false,
/circular-progress.*.json$/,
/\.\/circular-progress.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/css-baseline.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/css-baseline',
false,
/css-baseline.*.json$/,
/\.\/css-baseline.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/dialog-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/dialog-actions',
false,
/dialog-actions.*.json$/,
/\.\/dialog-actions.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/dialog-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/dialog-content',
false,
/dialog-content.*.json$/,
/\.\/dialog-content.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/dialog-title.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/dialog-title',
false,
/dialog-title.*.json$/,
/\.\/dialog-title.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
6 changes: 5 additions & 1 deletion docs/pages/joy-ui/api/divider.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ export default function Page(props) {
}

Page.getInitialProps = () => {
const req = require.context('docs/translations/api-docs-joy/divider', false, /divider.*.json$/);
const req = require.context(
'docs/translations/api-docs-joy/divider',
false,
/\.\/divider.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

return {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Page(props) {
}

Page.getInitialProps = () => {
const req = require.context('docs/translations/api-docs-joy/drawer', false, /drawer.*.json$/);
const req = require.context('docs/translations/api-docs-joy/drawer', false, /\.\/drawer.*.json$/);
const descriptions = mapApiPageTranslations(req);

return {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/form-control.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/form-control',
false,
/form-control.*.json$/,
/\.\/form-control.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/form-helper-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/form-helper-text',
false,
/form-helper-text.*.json$/,
/\.\/form-helper-text.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/form-label.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/form-label',
false,
/form-label.*.json$/,
/\.\/form-label.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Page(props) {
}

Page.getInitialProps = () => {
const req = require.context('docs/translations/api-docs-joy/grid', false, /grid.*.json$/);
const req = require.context('docs/translations/api-docs-joy/grid', false, /\.\/grid.*.json$/);
const descriptions = mapApiPageTranslations(req);

return {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/icon-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/icon-button',
false,
/icon-button.*.json$/,
/\.\/icon-button.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Page(props) {
}

Page.getInitialProps = () => {
const req = require.context('docs/translations/api-docs-joy/input', false, /input.*.json$/);
const req = require.context('docs/translations/api-docs-joy/input', false, /\.\/input.*.json$/);
const descriptions = mapApiPageTranslations(req);

return {
Expand Down
7 changes: 5 additions & 2 deletions docs/pages/joy-ui/api/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@
"name": "union",
"description": "'danger'<br>&#124;&nbsp;'neutral'<br>&#124;&nbsp;'primary'<br>&#124;&nbsp;'success'<br>&#124;&nbsp;'warning'<br>&#124;&nbsp;string"
},
"default": "'neutral'",
"additionalInfo": { "joy-color": true }
},
"endDecorator": { "type": { "name": "node" } },
"error": { "type": { "name": "bool" } },
"fullWidth": { "type": { "name": "bool" } },
"error": { "type": { "name": "bool" }, "default": "false" },
"fullWidth": { "type": { "name": "bool" }, "default": "false" },
"size": {
"type": {
"name": "union",
"description": "'sm'<br>&#124;&nbsp;'md'<br>&#124;&nbsp;'lg'<br>&#124;&nbsp;string"
},
"default": "'md'",
"additionalInfo": { "joy-size": true }
},
"startDecorator": { "type": { "name": "node" } },
Expand All @@ -31,6 +33,7 @@
"name": "union",
"description": "'outlined'<br>&#124;&nbsp;'plain'<br>&#124;&nbsp;'soft'<br>&#124;&nbsp;'solid'<br>&#124;&nbsp;string"
},
"default": "'outlined'",
"additionalInfo": { "joy-variant": true }
}
},
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/linear-progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/linear-progress',
false,
/linear-progress.*.json$/,
/\.\/linear-progress.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Page(props) {
}

Page.getInitialProps = () => {
const req = require.context('docs/translations/api-docs-joy/link', false, /link.*.json$/);
const req = require.context('docs/translations/api-docs-joy/link', false, /\.\/link.*.json$/);
const descriptions = mapApiPageTranslations(req);

return {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/joy-ui/api/list-divider.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Page.getInitialProps = () => {
const req = require.context(
'docs/translations/api-docs-joy/list-divider',
false,
/list-divider.*.json$/,
/\.\/list-divider.*.json$/,
);
const descriptions = mapApiPageTranslations(req);

Expand Down
Loading

0 comments on commit 0868fce

Please sign in to comment.