Search code examples
node.jsnpmnode-modulesnewman

How to set custom keyword for node project?


if i published my project, i can get through

npm i <myproject>

if i want to use, i need to call like

./nodemodules/myproject [arg0] [arg1]

or

npx myproject [arg0] [arg1]

but i don't want to call ./node.. or npx instead i want to use custom keyword to call my project like newman

If you see this project : https://www.npmjs.com/package/newman

they are simply calling

newman run colname environment 

no where they are using

./nodemodules/newman or npx newman

likewise, i want custom keyword that should recognize mine ./nodemodules/myproject

suggest me how newman did this ? or suggest how to achieve this ?


Solution

  • Global installation resolved the issue, Thank you @jonrsharpe. New module exposed in npm registry

    https://www.npmjs.com/package/jaiman