--
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 nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
Would it be as effective as every time you run npm install (or
uninstall), to run:
npm ls > vendor.txt
Of course, you need to do it manually. Why doesn't npm have an
automatic "here is a list of all the things currently installed"? It
can be updated by npm every time it runs, say every run of npm install
or uninstall automatically dumps the output of "npm ls" to .npmls or
similar in the same parent dir of node_modules parallel to it. isaacs?
Back to earth: when you install modules 3rd-party, npm or vendor or
anyhow, do you put them under version control? You said yes.
On Dec 4, 11:15 pm, Marak Squires <marak.squi...@gmail.com> wrote:
> I feel this this conversation is going in four different directions and no
> one understands what the other person is talking about.
>
> I give up.
>
>
>
>
>
>
>
>
>
> On Sun, Dec 4, 2011 at 1:13 PM, Avi Deitcher <a...@deitcher.net> wrote:
> > So, you basically ignore the whole npm and node_modules. What does it buy
> > you? From a git perspective, you are versionizing identically to
> > node_modules. You just have to explicitly path as opposed to require('foo').
>
> > Avi Deitcher
> > a...@deitcher.net
>
> > --
> > 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 nod...@googlegroups.com
> > To unsubscribe from this group, send email to
> > nodejs+un...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/nodejs?hl=en?hl=en
>
> --
> --
> Marak Squires
> Co-founder and Chief Evangelist
> Nodejitsu, Inc.
He uses npm, it puts them in node_modules, this is the best way to do
this with npm installable modules. I don't think this is the issue
here.
@avi ... but if you want to bundle a module which _isn't_ npm
installable, you could put it in a 'vendor' folder, which you _do_
check in to Git
So, for example you might have the following structure:
* myapp.js
* vendor/a-module-that-isnt-npm-installable/*
* vendor/another-module-that-isnt-npm-installable/*
* node_modules/express/*
* node_modules/data2xml/*
* node_modules/everyauth/*
The two vendor folders _are_ checked in to Git. The three node_modules
folder are _not_ checked in. They are installed with npm.
Finally, you might have the following in your .gitignores :
node_modules
*~
Hope that helps,
Andy
--
Andrew Chilton
e: chi...@appsattic.com
w: http://www.appsattic.com/
p: +64 21 891 681
He puts the npm installable modules into node_modules. He puts the
non-npm installable modules into vendor.
node_modules is _not_ checked into Git. Vendor is. :)
Does that make sense?
Cheers,
Andy
You do exactly the same, just have a package.json file which lists
your dependecies. You check package.json into Git and voila ... you're
tracking your dependencies. :)
For example, a snippet from one of my private projects is as follows:
"dependencies": {
"express" : ">= 2.5.1",
"stylus" : ">= 0.19.5",
"jade" : ">= 0.18.0",
"passgen" : ">= 1.0.0"
},
When I do a fresh checkout of my repo, I just do the following and
everything is exactly as I like it:
$ git checkout myproject
$ npm -d install
Try that and let me know how it goes.
Cheers,
Andy
--
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 nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
I don't think you'd want it to do that - well, let me rephrase - *I*
wouldn't want it to do that. I want to either be explicit with the
version "= 0.2.0" or less so with a minimum version such as ">=
0.2.0".
In another note, I found something useful in npm which is good for
targeting non-npm modules/applications. Put a "private" : true into
your package.json and it'll help you to stop accidentally uploading it
to npm. :) See http://npmjs.org/doc/registry.html for more info.
For install, use 'npm install --save' and it will do that for you. I
don't believe it's supported for uninstall, though.
--
Martin Cooper
On 5 December 2011 12:11, Avi Deitcher <a...@deitcher.net> wrote:
> Is it idempotent? Can I add one line, rerun, and have it know to install
> just that one added?
Try it and see. :)
The answer is yes, but seriously, just try it and see. You're using
Git, you're a careful guy, nothing will disappear and even if it did,
your VCS is your backup. :) Experimentation is the key, as is reading
the manual.
Cheers,
Andy
--
Andrew Chilton
e: chi...@appsattic.com
w: http://www.appsattic.com/
--
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 nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
<https://github.com/c9/nog/blob/master/.gitignore>
<https://github.com/c9/nog/blob/master/package.json#L14-19>
<https://github.com/c9/nog/tree/master/node_modules>
-Tim Caswell
--
For the Googlers of the future that reach this thread: the answer depends on the nature of your project.
- Do track `node_modules` in your repo if you are deploying an app.
--
--
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 nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
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 nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to a topic in the Google Groups "nodejs" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nodejs/mqVj8f47P_U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nodejs+un...@googlegroups.com.
--