mirror of
https://github.com/tabler/tabler.git
synced 2025-12-21 17:34:25 +04:00
19 lines
537 B
JavaScript
19 lines
537 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, `../../shared/static/illustrations/light/*.png`))
|
|
.map((file) => {
|
|
return basename(file, '.png')
|
|
})
|
|
.sort((a, b) => a.localeCompare(b));
|
|
|
|
writeFileSync(
|
|
join(__dirname, `../../shared/data/illustrations.json`),
|
|
JSON.stringify(illustrations)
|
|
) |