Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

npm development

DTrejo edited this page Feb 23, 2012 · 5 revisions

This page describes how to set up your environment for npm development.

Here's a way of getting started.

git clone git://github.com/isaacs/npm.git
cd npm
make link

The npm command will now point to your checked out working copy.

If this does not work for you, try this:

git clone git://github.com/isaacs/npm.git
cd npm
make uninstall # or sudo make uninstall
make install # or sudo make install
npm link # or sudo npm link

/via [dscape][1] [1]: https://twitter.com/#!/dscape/status/155026526470021120

And for developing modules that npm depends on:

19:22 dtrejo: how do you usually develop one of your own modules that npm depends on?
19:22 dtrejo: (and test that it works w/ npm at the same time)
19:27 isaacs: dtrejo: i write a test for it, then i make it pass that test, then i install it in npm and make sure it fixes the bug in npm.
19:28 isaacs: dtrejo: as if i'm 2 people, one consuming from the other
19:28 isaacs: dtrejo: occasinally, i'll just develop it in npm/node_modules first.
19:28 isaacs: dtrejo: oh, also, i have ~/dev/node_modules where all my node programs live.
19:28 isaacs: dtrejo: so i can require("foo") any of my things

Easy way to set a boolean (e.g. npat=true)

npat will be true:

npm install gss --npat 

Alternatively

npm install gss --npat=true
npm install gss --npat=false

Run the node debugger easily

node debug $(which npm) install gss