-
-
Notifications
You must be signed in to change notification settings - Fork 12.1k
/
jsdoc3.rb
35 lines (29 loc) 路 998 Bytes
/
jsdoc3.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require "language/node"
class Jsdoc3 < Formula
desc "API documentation generator for JavaScript"
homepage "https://jsdoc.app/"
url "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.3.tgz"
sha256 "853e0a2d2f32b8bf3b5f7a5730e23ec1cb138a616e066bb2bc658d13c349da57"
license "Apache-2.0"
head "https://github.com/jsdoc3/jsdoc.git", branch: "main"
bottle do
sha256 cellar: :any_skip_relocation, all: "c35722a3f75b7465fddb932314a8825cdd0ecb8e42a1e0f96cea83944b5c221f"
end
depends_on "node"
def install
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
bin.install_symlink Dir["#{libexec}/bin/*"]
end
test do
(testpath/"test.js").write <<~EOS
/**
* Represents a formula.
* @constructor
* @param {string} name - the name of the formula.
* @param {string} version - the version of the formula.
**/
function Formula(name, version) {}
EOS
system bin/"jsdoc", "--verbose", "test.js"
end
end