Showing posts with label npm. Show all posts
Showing posts with label npm. Show all posts
Tuesday, April 9, 2013
Using npm modules
var foo = require('module-name')
var parser = require('node-markdown);
Under your project > node-modules > package.json
...
},
"dependencies" : {
"markdown": "0.1.0",
"module": "*",
},
...
loading local modules > data_module
//search for npm modules
$npm search | grep some-string
$npm search
//install a module
$cd folder
$npm install node-markdown
//setup project with npm
$cd Desktop/html
$npm init
//fill in and enter on each of the queries
//edit the package.json with all your modules info and run:
$npm install
$npm update //update the modules
$sudo npm update -g //run as sudo since global
$npm prune //remove modules in your project
Monday, April 8, 2013
Node Package Manager - NPM
>npm search
>npm ls
>npm install module-name
>npm init
// module packages created after running npm init
>npm ls
>npm install module-name
>npm init
// module packages created after running npm init
Subscribe to:
Comments (Atom)