add an npm formula

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
master
Corey Donohoe 2010-05-25 11:46:33 -07:00 committed by Adam Vandenberg
parent 408665c9e2
commit 9f58f8dc1e
1 changed files with 36 additions and 0 deletions

36
Formula/npm.rb Normal file
View File

@ -0,0 +1,36 @@
require 'formula'
class Npm <Formula
url 'http://github.com/isaacs/npm/tarball/v0.1.13'
head 'git://github.com/isaacs/npm.git'
homepage 'http://github.com/isaacs/npm'
md5 '5a7f97880693fbb72996d30c4aa8308a'
depends_on 'node'
def install
# install all the required libs in libexec
libexec.install Dir["*"]
# install man pages
man1.mkpath
ln_s libexec+'man/npm.1', man1+'npm.1'
# install the wrapper executable
(bin+"npm").write executable
end
def caveats
<<-EOS.undent
npm is still under heavy development.
Hopefully this package will help keep people up to date.
EOS
end
def executable
<<-EOS
#!/bin/sh
exec "#{libexec}/cli.js" "$@"
EOS
end
end