I have a few helper functions I'd like to have available globally in the command line. I have been able to achieve this with npm link
, following this tutorial:
{
"name": "tool1",
...
"bin": "./standalone-functions/tool1.js",
...
}
However, I have a few of those in a single project, e.g.
standalone-functions/tool1.js
, standalone-functions/tool2.js
, standalone-functions/tool3.js
etc.
But I only have one package.json
. So I successfully linked one. But is there a way to also link the others or would I have to have separate projects with separate package.json
s for each?
you can add keys to your commands:
and then execute whatever you need.