MCPcopy
hub / github.com/tailwindlabs/heroicons / exportAll

Function exportAll

scripts/build.js:82–92  ·  view source on GitHub ↗
(icons, format, includeExtension = true)

Source from the content-addressed store, hash-verified

80}
81
82function 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
94async function ensureWrite(file, text) {
95 await fs.mkdir(dirname(file), { recursive: true })

Callers 1

buildIconsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…