pastel icon indicating copy to clipboard operation
pastel copied to clipboard

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

Open adam-lynch opened this issue 4 years ago • 2 comments

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!

adam-lynch avatar Mar 02 '20 06:03 adam-lynch

You saved me a world of trouble, thanks!

matthewlynch avatar May 05 '20 17:05 matthewlynch

You're welcome cousin 👍

adam-lynch avatar May 05 '20 17:05 adam-lynch