Is it possible to alias when running yarn link
. Specifically when yarn link
is run (As described here) and the package.json name
attribute is contacto
yarn link
creates an executable command named contacto
. But what if we it to be co
instead such that users can run npm i contacto
and subsequently use co
as a command?
Asked
Active
Viewed 1,310 times
0
1 Answers
0
Turns out it's really simple. In package.json
just add:
"bin": {"co": "./index.js"}
Then run npm i -g
in the project directory and now co
is part of your shell.

Ole
- 41,793
- 59
- 191
- 359