(icons, format, includeExtension = true)
| 80 | } |
| 81 | |
| 82 | function exportAll(icons, format, includeExtension = true) { |
| 83 | return icons |
| 84 | .map(({ componentName }) => { |
| 85 | let extension = includeExtension ? '.js' : '' |
| 86 | if (format === 'esm') { |
| 87 | return `export { default as ${componentName} } from './${componentName}${extension}'` |
| 88 | } |
| 89 | return `module.exports.${componentName} = require("./${componentName}${extension}")` |
| 90 | }) |
| 91 | .join('\n') |
| 92 | } |
| 93 | |
| 94 | async function ensureWrite(file, text) { |
| 95 | await fs.mkdir(dirname(file), { recursive: true }) |
no outgoing calls
no test coverage detected
searching dependent graphs…