And you need to have an user account it npm (easy steps, if I could do it, everyone can ;-) (user, password, email, AFAIR). Then, you can add your user to every machine you are working on.
For global install, take into account that you could add some commands (in two flavors, shell script AND windows .cmd) to use at command prompt. Check the code of any module that supports global installs, like Express. The commands you define are available in local install, too. Angel "Java" Lopez @ajlopez gh:ajlopez On Mon, Dec 17, 2012 at 7:57 AM, José F. Romaniello <[email protected]>wrote: > You need a package.json, and then you can do npm publish. > > https://npmjs.org/doc/json.html > > A handy way to write the json file is to start with: npm init this will > ask you some question and then generate a package.json file for you. > > BTW, in node.js modules are installed locally by default, so there is no > need to use "sudo" with npm install. In some system to install modules > globally you will need it, for instance sudo npm install -g xxxx > > > 2012/12/16 Andy Green <[email protected]> > >> Is there any way to distribute node.js modules using npm? If I created a >> .js file called my-custom-module.js, how could I allow other users to >> install it using the command "sudo npm install my-custom-module"? >> >> -- >> Job Board: http://jobs.nodejs.org/ >> Posting guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en >> > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
