From 9eaaa9b6328ba9a94c738c736307bb2b14bc8a15 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 23 Sep 2024 10:12:44 +0300 Subject: [PATCH] Remove legacy codes --- apps/showcase/scripts/build-apidoc.js | 68 --------------------------- 1 file changed, 68 deletions(-) diff --git a/apps/showcase/scripts/build-apidoc.js b/apps/showcase/scripts/build-apidoc.js index 85e8d50e2..519502591 100644 --- a/apps/showcase/scripts/build-apidoc.js +++ b/apps/showcase/scripts/build-apidoc.js @@ -680,74 +680,6 @@ if (project) { }); }); - const module_designtokens_group = module.groups?.find((g) => g.title === 'DesignTokens'); - - module_designtokens_group && - module_designtokens_group.children.forEach((event) => { - const event_props_description = event.comment && event.comment.summary.map((s) => s.text || '').join(' '); - let component_prop = ''; - - if (event.comment && event.comment.getTag('@see')) { - const tag = event.comment.getTag('@see'); - const content = tag.content[0]; - - if (content.text.includes("['")) { - component_prop = `${content.target.name}${content.text}`; - } else { - component_prop = `${content.text === content.target?.name ? content.target.parent.name : content.target?.name}.${content.text}`; - } - } - - !doc[name]['tokens'] && - (doc[name]['tokens'] = { - description: staticMessages['tokens'], - values: {} - }); - - const props = []; - - const setProps = (_declaration, _name) => { - if (_declaration?.groups) { - const event_props_group = _declaration.groups.find((g) => g.title === 'Properties'); - - event_props_group && - event_props_group.children.forEach((prop) => { - if (prop.type?.declaration) { - setProps(prop.type?.declaration, prop.name); - } else if (prop.comment?.getTag('@designToken')) { - props.push({ - name: _name ? `${_name}.${prop.name}` : prop.name, - token: prop.comment.getTag('@designToken').content[0]?.text || '', - optional: prop.flags.isOptional, - readonly: prop.flags.isReadonly, - type: prop.type.toString(), - default: prop.comment && prop.comment.getTag('@defaultValue') ? prop.comment.getTag('@defaultValue').content[0]?.text || '' : '', // TODO: Check - description: - prop.comment && - prop.comment.summary - .map((s) => { - if (s.text.indexOf('[here]') > -1) { - return `${s.text.slice(0, s.text.indexOf('[here]'))} here ${s.text.slice(s.text.indexOf(')') + 1)}`; - } - - return s.text || ''; - }) - .join(' '), - deprecated: prop.comment && prop.comment.getTag('@deprecated') ? parseText(prop.comment.getTag('@deprecated').content[0]?.text) : undefined - }); - } - }); - } - }; - - setProps(event); - - doc[name]['tokens'].values[event.name] = { - description: event_props_description, - props - }; - }); - // app.generateJson(module, `./api-generator/module-typedoc.json`); });