mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
doc: make doc-only -> fallback to user binary
After the #3888 it was not possible to "make doc-only" in some situations. This now fallsback to any installed node version and throws "node not found" in error case. Ref: https://github.com/nodejs/node/pull/3888 PR-URL: https://github.com/nodejs/node/pull/6906 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
committed by
Myles Borins
parent
223c0e2010
commit
e9ff0f8fb2
8
Makefile
8
Makefile
@@ -272,11 +272,15 @@ out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
|
||||
out/doc/%: doc/%
|
||||
cp -r $< $@
|
||||
|
||||
# check if ./node is actually set, else use user pre-installed binary
|
||||
gen-json = tools/doc/generate.js --format=json $< > $@
|
||||
out/doc/api/%.json: doc/api/%.md
|
||||
$(NODE) tools/doc/generate.js --format=json $< > $@
|
||||
[ -x $(NODE) ] && $(NODE) $(gen-json) || node $(gen-json)
|
||||
|
||||
# check if ./node is actually set, else use user pre-installed binary
|
||||
gen-html = tools/doc/generate.js --node-version=$(FULLVERSION) --format=html --template=doc/template.html $< > $@
|
||||
out/doc/api/%.html: doc/api/%.md
|
||||
$(NODE) tools/doc/generate.js --node-version=$(FULLVERSION) --format=html --template=doc/template.html $< > $@
|
||||
[ -x $(NODE) ] && $(NODE) $(gen-html) || node $(gen-html)
|
||||
|
||||
docopen: out/doc/api/all.html
|
||||
-google-chrome out/doc/api/all.html
|
||||
|
||||
Reference in New Issue
Block a user