|
|
Thanks to Isaac, npm is getting more and more awesome by the hour. One of the coolest recent additions (you need at least v1.0.26) is the ability to specify private git repositories urls as a dependency in your package.json files. At transloadit, we are currently using the feature to move some of our infrastructure code into separate packages, allowing for those to be tested and developed in isolation making our core application easier to maintain and work on. The syntax for referencing a git repository (and commit) is as follows:
{
"name": "my-app", "dependencies": { "private-repo": "git+ssh:// This e-mail address is being protected from spambots. You need JavaScript enabled to view it :my-account/node-private-repo.git#v0.0.1", } } This will include a private npm module called Now of course this is not the only way to do private npm repositories, but it is much simpler than running your own registry, so I would recommend it to most people. Before you head of to play with this, here is a final tip that may safe you
some headaches. In all your private npm modules, add Happy hacking, --fg PS: When deploying, don't forget that you need to authorize the servers ssh key for the GitHub repository you are depending on.
|