vadimdemedes / pastel

🎨 Next.js-like framework for CLIs made with Ink
https://term.ink/pastel
MIT License
2.2k stars 36 forks source link

Doesn't like having a CLI name that's different to the package name #29

Open adam-lynch opened 4 years ago

adam-lynch commented 4 years ago

It took me way too long to realise that you can do this in your package.json:

  "name": "@org/package-name",
  "bin": {
    "cli-name": "./bin/cli.js"
  }

So it would help to document that in the README.md first of all.

Everything works then; i.e. you can use cli-name in dev and prod to run the CLI. However, pastel dev still shows the package name;

Development mode

Pastel watches your "commands" directory for changes and rebuilds application
when needed. After first successful build Pastel will also link your CLI for
you, so feel free to run your command right away:

$ @org/package-name --help

Now go create some beautiful CLI!
matthewlynch commented 4 years ago

You saved me a world of trouble, thanks!

adam-lynch commented 4 years ago

You're welcome cousin 👍