npm-demo-testing-maz
v0.0.4
Published
A demo package for a video
Downloads
2
Readme
Installation
npm
-- save : to install package and save it as a dependency in the package.json file
$ npm install npm-demo-testing-maz --save
Test
create anyfile on js for example index.js. replace code on below
var demo = require('npm-demo-testing-maz');
demo.printMsg();
run command
$ node index.js
Usage
Tutorial to develop node module
$ npm init
create index.js
exports.printMsg = function() {
console.log("This is a message from the demo package");
}
push to git
$ git add.
$ git commit -m "Initial release"
$ git tag v0.0.1
$ git push origin master --tags
publish to npm package
** if not login or havent user yet
npm register user
$ npm add user
npm login
$ npm login
publish
$ npm publish