1
0
mirror of https://github.com/tabler/tabler.git synced 2026-08-08 20:32:24 +04:00
Files
tabler/preview/.build/import-illustrations.mjs
T
2025-04-15 23:18:49 +02:00

18 lines
486 B
JavaScript

#!/usr/bin/env node
import { writeFileSync } from 'node:fs';
import { join, basename, dirname } from 'node:path';
import { sync } from 'glob';
import { fileURLToPath } from 'node:url';
const __dirname = dirname(fileURLToPath(import.meta.url))
const illustrations = sync(join(__dirname, `../static/illustrations/light/*.png`))
.map((file) => {
return basename(file, '.png')
})
writeFileSync(
join(__dirname, `../shared/data/illustrations.json`),
JSON.stringify(illustrations)
)