diff options
| author | Kazuhiro Sera | 2014-10-19 00:15:22 +0900 |
|---|---|---|
| committer | Mike McQuaid | 2014-10-22 18:27:35 +0100 |
| commit | 516833b7def86ec0cbdaf2f3d40f26e1686fcc99 (patch) | |
| tree | 137d264213880ec53bf457e0c61574d7d2defe54 /Library/Formula | |
| parent | 29ad65d76edf4d9eb979ef849c28fb326510bd36 (diff) | |
| download | homebrew-516833b7def86ec0cbdaf2f3d40f26e1686fcc99.tar.bz2 | |
skinny 1.3.4 (new formula)
Skinny is a full-stack web app framework built on Scalatra.
Closes #33309.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/skinny.rb | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Library/Formula/skinny.rb b/Library/Formula/skinny.rb new file mode 100644 index 000000000..2145be44a --- /dev/null +++ b/Library/Formula/skinny.rb @@ -0,0 +1,42 @@ +require "formula" + +class UniversalNpm < Requirement + fatal true + satisfy { which("npm") } + def message + "npm is required. If you have installed node with `--without-npm` option, reinstall with `--with-npm`." + end +end + +class Skinny < Formula + homepage "http://skinny-framework.org/" + url "https://github.com/skinny-framework/skinny-framework/releases/download/1.3.4-1/skinny-1.3.4-1.tar.gz" + sha1 "59cba0afb287b06f2a6ddf2d7f2fb238a3653508" + + depends_on "node" + depends_on UniversalNpm + + option "without-npm-generator", "Yeoman generator will not be installed" + + def install + libexec.install Dir["*"] + (bin/"skinny").write <<-EOS.undent + #!/bin/bash + export PATH=#{bin}:$PATH + PREFIX="#{libexec}" exec "#{libexec}/skinny" "$@" + EOS + end + + def post_install + return if build.without? "npm-generator" + + cd libexec + system "npm", "install", "yo" + ln_s libexec/"node_modules/yo/cli.js", bin/"yo" + system "npm", "install", "generator-skinny" + end + + test do + system bin/"skinny", "new", "myapp" + end +end |
