Received: by 10.216.203.96 with SMTP id e74mr1396203weo.1.1349883133329; Wed, 10 Oct 2012 08:32:13 -0700 (PDT) X-BeenThere: nodejs@googlegroups.com Received: by 10.180.73.17 with SMTP id h17ls12990769wiv.0.canary; Wed, 10 Oct 2012 08:31:38 -0700 (PDT) Received: by 10.180.106.102 with SMTP id gt6mr1737198wib.0.1349883098254; Wed, 10 Oct 2012 08:31:38 -0700 (PDT) Received: by 10.180.106.102 with SMTP id gt6mr1737197wib.0.1349883098236; Wed, 10 Oct 2012 08:31:38 -0700 (PDT) Return-Path: Received: from mail.thinkdigital.pt (thinkdigital.pt. [81.84.251.170]) by gmr-mx.google.com with ESMTP id k11si1947916wiv.0.2012.10.10.08.31.38; Wed, 10 Oct 2012 08:31:38 -0700 (PDT) Received-SPF: pass (google.com: domain of drese...@thinkdigital.pt designates 81.84.251.170 as permitted sender) client-ip=81.84.251.170; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of drese...@thinkdigital.pt designates 81.84.251.170 as permitted sender) smtp.mail=drese...@thinkdigital.pt Received: from localhost (localhost [127.0.0.1]) by mail.thinkdigital.pt (Pigeon) with ESMTP id 5E96A8AC7EC for ; Wed, 10 Oct 2012 15:31:37 +0000 (UCT) Received: from mail.thinkdigital.pt ([127.0.0.1]) by localhost (pigeon.thinkdigital.pt [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id sAoml1Hqq7oU for ; Wed, 10 Oct 2012 15:31:37 +0000 (UCT) Received: from [192.168.0.168] (unknown [192.168.0.168]) by mail.thinkdigital.pt (Pigeon) with ESMTPA id 1F9258AC7E5 for ; Wed, 10 Oct 2012 15:31:36 +0000 (UCT) Date: Wed, 10 Oct 2012 16:31:36 +0100 From: Diogo Resende To: nodejs@googlegroups.com Message-ID: <32A2D550FE5141D8ADFA278D8DF74B2B@thinkdigital.pt> In-Reply-To: <6c8192b3-e484-4742-8dbe-85359180a654@googlegroups.com> References: <6c8192b3-e484-4742-8dbe-85359180a654@googlegroups.com> Subject: Re: [nodejs] "node_modules" for private modules that need to be committed? X-Mailer: sparrow 1.6.3 (build 1164) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="507594d8_59f0446_165fb" --507594d8_59f0446_165fb Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline You have 2 choices: 1. Change your .gitignore 2. Change your require() calls Example for 1: (instead of having "node_modules") node_modules/a node_modules/b ... Example for 2: (in case you put your module in priv_modules) var xpto = require("./priv_modules/xpto"); -- Diogo Resende On Wednesday, October 10, 2012 at 16:09 , Tom wrote: > I've added the node_modules folder to my .gitignore file, which works fine thanks to NPM Shrinkwrap (after deploying I need to run npm install using the shrinkwrap.json file). > > However, I've got some private modules now that I won't publish to NPM. I would like to require these modules like the other modules in node_modules. > > Unfortunately I cannot put these modules in node_modules, because they'd be ignored by git, messing with my future deployment. > > Where should I place these modules instead? I've been told that editing the paths variable for node's module lookup is highly unrecommended. > > Note that these are small undocumented nonpublic modules, which is why I don't want to publish them to NPM. > > Tom > > -- > 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 nodejs@googlegroups.com (mailto:nodejs@googlegroups.com) > To unsubscribe from this group, send email to > nodejs+unsubscribe@googlegroups.com (mailto:nodejs+unsubscribe@googlegroups.com) > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en --507594d8_59f0446_165fb Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
You have 2 choices:

1. Change your .gitignore
2. Change your require() calls

Example for= 1:
(instead of having =22node=5Fmodules=22)

node=5Fmodules/a
node=5Fmodules/b
...

Example for 2:
(in case you put your module in= priv=5Fmodules)

var xpto =3D require(=22./priv=5F= modules/xpto=22);

-- 
Diogo Resende=

=20

On Wednesday, October = 10, 2012 at 16:09 , Tom wrote:

I've added the node=5Fmodules folder = to my .gitignore file, which works fine thanks to NPM Shrinkwrap (after d= eploying I need to run npm install using the shrinkwrap.json file).
<= br>
However, I've got some private modules now that I won't pub= lish to NPM. I would like to require these modules like the other modules= in node=5Fmodules.

Unfortunately I cannot put t= hese modules in node=5Fmodules, because they'd be ignored by git, messing= with my future deployment.

Where should I place= these modules instead=3F I've been told that editing the paths variable = for node's module lookup is highly unrecommended.

Note that these are small undocumented nonpublic modules, which is why = I don't want to publish them to NPM.

Tom

--
Job Board: http://jobs.nodejs.org= /
Posting guidelines: https://github.com/joyent/node/wiki/Mailin= g-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups =22nodejs=22 group.
To post to this group, send email to nodejs=40googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsub= scribe=40googlegroups.com
=46or more options, visit this group at
http://groups.google.com/group/nodejs=3Fhl=3Den=3Fhl=3Den
=20 =20 =20 =20 =20

--507594d8_59f0446_165fb--