preview-random-icons.mjs 649 B

123456789101112131415161718192021222324
  1. import { globSync } from 'glob'
  2. import { ICONS_SRC_DIR, generateIconsPreview, GITHUB_DIR } from './helpers.mjs'
  3. import path from 'path'
  4. let files = globSync(path.join(ICONS_SRC_DIR, 'outline/*.svg'))
  5. files = files.filter(file =>
  6. !file.endsWith('-filled.svg')
  7. && !file.endsWith('-off.svg')
  8. && !file.includes('number-')
  9. && !file.includes('letter-')
  10. && !file.includes('loader')
  11. && !file.includes('small')
  12. );
  13. files = files.sort(() => Math.random() - 0.5)
  14. files = files.slice(0, 500)
  15. await generateIconsPreview(files, path.join(GITHUB_DIR, 'preview/random-icons.svg'), {
  16. background: 'transparent',
  17. columnsCount: 25,
  18. stroke: 1.5
  19. })