Coder Social home page Coder Social logo

akshit-g / npx_card Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ragharwal/npx_card

0.0 0.0 0.0 16 KB

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

Home Page: https://www.npmjs.com/package/ragharwal

JavaScript 100.00%

npx_card's Introduction

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

npx_card's People

Contributors

ragharwal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.