How to re-generate vendor/heroicons?

Hi there,

I created a sample Phoenix app and checked the code to Github. However, I omitted vendor/heroicons and thought I could re-generate the icon files, but when I launched the app mix phx.server I keep getting this error

Error: ENOENT: no such file or directory, scandir '<PATH>/assets/vendor/heroicons/optimized/24/outline'
    at Object.readdirSync (node:fs:1405:3)
    at Object.readdirSync (pkg/prelude/bootstrap.js:1309:35)
    at <PATH>/assets/tailwind.config.js:45:12
    at Array.forEach (<anonymous>)
    at <PATH>/assets/tailwind.config.js:44:13
    at registerPlugins (/snapshot/tailwindcss/lib/lib/setupContextUtils.js:787:61)
    at createContext (/snapshot/tailwindcss/lib/lib/setupContextUtils.js:1178:5)
    at createContext (/snapshot/tailwindcss/lib/processTailwindFeatures.js:46:61)
    at Object.getContext (/snapshot/tailwindcss/lib/cli/build/plugin.js:207:24)
    at /snapshot/tailwindcss/lib/cli/build/plugin.js:254:38 {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: '<PATH>/assets/vendor/heroicons/optimized/24/outline'

I think I can generate another app and copy the icons file, but it doesn’t make sense. Is there a way to re-generate the icons?

Just run mix some_project in another directory and copy the required files over.

I recall reading it somewhere and sure enough

It came down to a simple curl:

cd assets/vendor
export HERO_VSN="2.0.16" ; \
  curl -L "${HERO_VSN}.tar.gz" | \
  tar -xvz --strip-components=1 heroicons-${HERO_VSN}/optimized

Will try to create a simple mix task in my project for this, so I don’t need to commit the *.svg