Reputation: 3167
I created a package named env-subset
that supplies an executable via the bin
key in package.json
:
"bin": {
"env-subset": "./index.js"
},
Is there an official blessed way to make this executable actually materialize somewhere so that I can execute it, without doing any of the following:
node path/to/my/env-subset/index.js
and low key hopes it won't fail in a thousand places?Upvotes: 1
Views: 161
Reputation: 7646
Install your package as a dependency of itself:
pnpm add -D env-subset@link:
Now you can run:
pnpm env-subset
Or:
./node_modules/.bin/env-subset
Upvotes: 1