Mochabot log - CommonJS IRC channel: #commonjs on irc.freenode.net

2011-07-25:

[18:30] <tetsuharu> hey there, guys :)
[18:30] <tetsuharu> is there any way to specify a git repo to build an npm package from in my package.json file?
[18:31] <tetsuharu> I come from Ruby, so I'm used to being able to do gem 'something', :git => 'git://....'
[18:31] <tetsuharu> I don't see anything here (http://wiki.commonjs.org/wiki/Packages/1.1) about git besides the package's source repo
[18:31] <tetsuharu> also, is package.json a good format to use for application dependency versioning
[18:32] <deanlandolt> tetsuharu: check out http://www.sitepen.com/blog/2011/07/25/dojo-foundation-packages/ or head over to #node.js and ping isaacs
[18:32] <deanlandolt> tetsuharu: yes, package.json is explicitly for application dep versioning
[18:33] <tetsuharu> yay :D
[18:34] <deanlandolt> i can tell you that a package in npm is any tar.gz or zip, so you can use git's archive feature for that
[18:34] <deanlandolt> err, git*hub*'s archive feature
[18:38] <tetsuharu> how do I specify a url for the package then?
[18:39] <deanlandolt> https://github.com/isaacs/npm/blob/master/doc/publish.md
[18:40] <tetsuharu> will that publish to my local registry or the public registry
[18:40] <deanlandolt> https://github.com/<user>/<pacakge>/tarball/<tag>
[18:40] <deanlandolt> public registry since you're pointing npm to github
[18:41] <deanlandolt> or you could point npm to any old tarball -- spin one off of your local repo and publish it anywhere publically accessible over http and point npm there
[19:04] <tetsuharu> aha
[19:04] <tetsuharu> `man npm` has a whole section on url dependencies
[19:04] <tetsuharu> i am in love here
[19:04] <tetsuharu> ruby was so anti-unix-standards
[19:04] <tetsuharu> i figured i'd have to bug someone to get access to some decent docs
[23:27] <tetsuharu> so how do dependencies work in nodejs?
[23:27] <tetsuharu> i had two different versions of the the same npm package
[23:27] <tetsuharu> one is under a node_modules directory of a package i installed

 

 

Logs by date :