1.0.2 • Published 5 years ago
@rgz/hello-world v1.0.2
hello-world-npm
A simple example NPM package.
Installation
$ npm install @rgz/hello-world-npmUsage
const hello = require('@rgz/hello-world-npm');
hello.printHelloWorld();Creating and publishing your package
- Create a directory for your package :
$ mkdir my-package- Navigate into package directory :
$ cd my-package- If you are using github to manage your package code :
$ git init
$ git remote add origin https://github.com/user/repo.git- Set up your NPM package (create a package.json) :
$ npm init- Write the code !
- Dont forget to create the README.md file. 
- Login to NPM : 
$ npm login- Publish your package to the NPM registry :
npm publishThat's all folks !