()
| 56 | return { |
| 57 | name: pluginName, |
| 58 | async loadContent() { |
| 59 | // Clean up docs directory. |
| 60 | clean(); |
| 61 | // Create root components category. |
| 62 | createCategory('Components', '.'); |
| 63 | |
| 64 | const docs = {}; |
| 65 | |
| 66 | for (const item in pages) { |
| 67 | if (typeof pages[item] === 'string') { |
| 68 | const doc = createPageForComponent([item], pages[item]); |
| 69 | docs[pages[item]] = doc; |
| 70 | } else { |
| 71 | for (const subitem in pages[item]) { |
| 72 | const doc = createPageForComponent( |
| 73 | [item, subitem], |
| 74 | pages[item][subitem] |
| 75 | ); |
| 76 | docs[pages[item][subitem]] = doc; |
| 77 | } |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | return docs; |
| 82 | }, |
| 83 | async contentLoaded({ content: docs, actions }) { |
| 84 | // Store component docs global data so it can be used in `PropsTable` component. |
| 85 | actions.setGlobalData({ |
nothing calls this directly
no test coverage detected
searching dependent graphs…