shehza-d / trying-node-cli

A CLI App that prints my name in Terminal after installing(Fun project and good for practice)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Publish Executable to NPM

  1. Test your pkg before publishing to NPM

  2. Make a NODE Project by initializing

    npm init
  3. Add this in your package.json file

      "bin": "index.js",
  4. Add this on top of your file.

    #! /usr/bin/env node
  5. Create account on npmjs.com

  6. Login to npm on CLI (Terminal)

    npm login
  7. Publish your work with

     npm publish --access=public

If a package name is not available use your username as prefix

"name": "@username/unavailable-pkg-name",

"name": "@shehza-d/calculator",

About

A CLI App that prints my name in Terminal after installing(Fun project and good for practice)


Languages

Language:JavaScript 100.0%