Hi David, Yes, that's basically the main use for a package.json. If you put it in a directory and run `npm install`, it will install the dependencies specified. For projects where you want to lock down dependencies & their dependencies, look into using shrinkwrap:
https://npmjs.org/doc/shrinkwrap.html On Mon, Oct 7, 2013 at 11:32 AM, David Karr <[email protected]>wrote: > I've prototyped a javascript unit testing infrastructure using Karma under > npm. I created a package.json file, but I don't understand what I'm > supposed to do with this file. I've seen lots of documentation on how to > create this, but the explanations of what it's used for seem to be > incomplete. > > What I would HOPE I can do with it is store it in source control for my > project, and when I set up this build on another host, it will somehow read > the package.json file and install the expected versions of all the packages > I'm using. Is this a common and reasonable thing to do? If so, how do I > make this happen? > > -- > -- > 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 > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- 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 --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
