1. npm init
2. Enter Following Description
package name: (new-hello) mi-hello-new-world
version: (1.0.0)
description: This hello world package
entry point: (index.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to C:\Users\Pukar\Desktop\new-hello\package.json:
{
"name": "mi-hello-new-world",
"version": "1.0.0",
"description": "This hello world package",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
Is this OK? (yes) yes
3. npm adduser
4. npm login
5. npm whoami
6. create a file "index.js"
module.exports.area = radius => Math.PI*radius*radius;
module.exports.perimeter = radius => 2*Math.PI*radius;
7. npm version 1.0.0
8. npm publish
Check your npm repogistory.
0 comments:
Post a Comment