preview-random-icons.mjs 536 B

123456789101112131415161718192021
  1. import { glob } from 'glob'
  2. import { generateIconsPreview } from './helpers.mjs'
  3. glob('icons/*.svg', {}, async function (er, files) {
  4. files = files.filter(file =>
  5. !file.endsWith('-filled.svg')
  6. && !file.endsWith('-off.svg')
  7. && !file.startsWith('icons/number-')
  8. && !file.startsWith('icons/letter-')
  9. );
  10. files = files.sort(() => Math.random() - 0.5)
  11. files = files.slice(0, 500)
  12. await generateIconsPreview(files, 'random-icons.svg', {
  13. background: 'transparent',
  14. columnsCount: 25,
  15. png: false
  16. })
  17. })