zip-files.mjs 697 B

12345678910111213141516
  1. import Zip from 'adm-zip'
  2. import { getPackageJson, HOME_DIR } from './helpers.mjs'
  3. import { resolve } from 'path'
  4. const p = getPackageJson()
  5. const zip = new Zip()
  6. zip.addLocalFile(resolve(HOME_DIR, `.github/og.png`), '.', 'tabler-icons.png')
  7. zip.addLocalFolder(resolve(HOME_DIR, `packages/icons/icons/`), 'svg')
  8. zip.addLocalFolder(resolve(HOME_DIR, `packages/icons-png/icons/`), 'png')
  9. zip.addLocalFolder(resolve(HOME_DIR, `packages/icons-pdf/icons/`), 'pdf')
  10. zip.addLocalFolder(resolve(HOME_DIR, `packages/icons-eps/icons/`), 'eps')
  11. zip.addLocalFolder(resolve(HOME_DIR, `packages/icons-webfont/dist`), 'webfont')
  12. zip.writeZip(resolve(HOME_DIR, `packages-zip/tabler-icons-${p.version}.zip`));