MCPcopy Index your code
hub / github.com/simstudioai/sim / copyIconsFile

Function copyIconsFile

scripts/generate-docs.ts:244–260  ·  view source on GitHub ↗

* Copy the icons.tsx file from the main sim app to the docs app * This ensures icons are rendered consistently across both apps

()

Source from the content-addressed store, hash-verified

242 * This ensures icons are rendered consistently across both apps
243 */
244function copyIconsFile(): void {
245 try {
246 console.log('Copying icons from sim app to docs app...')
247
248 if (!fs.existsSync(ICONS_PATH)) {
249 console.error(`Source icons file not found: ${ICONS_PATH}`)
250 return
251 }
252
253 const iconsContent = fs.readFileSync(ICONS_PATH, 'utf-8')
254 fs.writeFileSync(DOCS_ICONS_PATH, iconsContent)
255
256 console.log('✓ Icons successfully copied to docs app')
257 } catch (error) {
258 console.error('Error copying icons file:', error)
259 }
260}
261
262/**
263 * Generate icon mapping from block definitions.

Callers 1

generateAllBlockDocsFunction · 0.85

Calls 2

logMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected