2.0.0 • Published 2 years ago

ragharwal v2.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

NPX Card

Type npx ragharwal to connect with me directly via console or terminal

Steps to Create your Own NPX Card

npm init

Start a new node project and name it whatever you want. You could choose to name it after the executable you want to expose. It's not necessary but conventions are nice, and it makes your binary more npx friendly.

mkdir ragharwal
cd ragharwal
npm init -y

At first, let's get the necessary CLI working.

echo >> index.js

Now open the new file in your favorite editor. I've have been using VS Code.

console.log('Working')

Be creative and add logic to create your own index.js or you can simply copy my index.js file and necessary changes as required.

Ship It

That's an entirely functional first release! You just need to modify your package.json to let npm know to link your executable and you are off.

{
    // ...
    "bin": "./index.js",
    // ...
}

By defalut, npm will expose your binary using the same name as your package.

Share your new CLI with the World!

Now anyone can leverage your new CLI using npx, without needing to install it locally.

npx $YOUR_PACKAGE_NAME
2.0.0

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago