huozhi / bunchee

Zero config bundler for ECMAScript and TypeScript packages
https://npmjs.com/bunchee
861 stars 28 forks source link

Fix bunchee command execution in readme #466

Closed piotr-cz closed 4 months ago

piotr-cz commented 4 months ago

Executing with npm results in

npm bunchee --prepare

Unknown command: "bunchee"

To see a list of supported npm commands, run:
  npm help
huozhi commented 4 months ago

That one is by purpose for the installed case. there's another line below with npx case

# "Or use with npx"
# npx bunchee@latest --prepare
piotr-cz commented 4 months ago

@huozhi

Command fails when bunchee is installed.

To reproduce, try:

npm install bunchee
npm bunchee --prepare
huozhi commented 4 months ago

oh that works with pnpm, for npm I guess we need to do npm exec bunchee --prepare?

piotr-cz commented 4 months ago

@huozhi Yes, for npm works both npm exec bunchee --prepare and npx bunchee --prepare