0.0.3 • Published 8 years ago
xjp-npm-publish-test v0.0.3
npm-publish-test
npm publish test
start
step 1
signup a acount in npm
step 2
write module code and a package.json with the info of the module, pay attention to name
, main
and version
step 3
run npm adduser
to add the npm user info to npm config
step 4
run npm publish /path/to/the/dir/of/module
. For more info about publish, https://docs.npmjs.com/cli/publish
If the name of the module has existed, there will throw a error you do not have permission to publish
.
use
now you can run npm install your-module-name
to install the module and use the module with var module = require("your-module-name")