uetchy / create-create-app

⚡️ Create your own `create-something` app.
MIT License
97 stars 24 forks source link

change prepublishOnly to prepack #64

Open aarondill opened 1 year ago

aarondill commented 1 year ago

This change allows installation of the package from git urls (ie npm i uetchy/create-create-app), as well as downloading the source and running npm pack to generate a tarball of the package.

aarondill commented 1 year ago

There is currently a bug in the npm CLI which does not call prepack on installation of git dependencies (npm/cli#1865 and npm/pacote#257), so this change will not work with git installations until that is fixed, however it still allows for npm pack as well as future usage of installation directly from github. The alternative solution to allow github installations to function is to use a prepare script, but this script runs on npm install without arguments, so it will compile files when installing dependencies for development.