Wednesday, 3 February 2016

Publish node module to access by NPM command

Publishing public node module is easy process like some command and you have it

  • create directory "demo-example-package"
  • cd demo-example-package
  • npm init 
    • type module name, description, version, author, entry point,etc.. 
  • create file index.js which is entry point of your module

I share one example module on https://www.npmjs.com/package/n-random, take it as example and right yout own code in to index.js and your have your module ready to go.

now publish this by : npm publish 

you can simply import your module by npm command like as like as other module.

npm install demo-example-package

for more information you can refer youtube video : https://www.youtube.com/watch?v=3I78ELjTzlQ  





Angularjs - RequreJS - Lazy loading Template for beginner


Simply install Node.js : https://nodejs.org/en/download/

install Git  : https://git-scm.com/downloads

clone seed project from 

https://github.com/mastermoin/angular-require-seed

run project by command

npm start

type url on browser : http://localhost:8000/app/#/view1 

Please read more about it on GIT repository home page