-
Notifications
You must be signed in to change notification settings - Fork 30.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add task for building docs only, using existing Node #3888
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,8 +36,8 @@ BUILDTYPE_LOWER := $(shell echo $(BUILDTYPE) | tr '[A-Z]' '[a-z]') | |
EXEEXT := $(shell $(PYTHON) -c \ | ||
"import sys; print('.exe' if sys.platform == 'win32' else '')") | ||
|
||
NODE ?= ./node$(EXEEXT) | ||
NODE_EXE = node$(EXEEXT) | ||
NODE ?= ./$(NODE_EXE) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this change necessary? It seems to me that they are creating the exact same result (testing this too) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not strictly necessary. Yes, they're meant to create the same result. The purpose of that change was to reduce duplication since the default value for |
||
NODE_G_EXE = node_g$(EXEEXT) | ||
|
||
# Flags for packaging. | ||
|
@@ -258,7 +258,9 @@ apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets | |
|
||
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*))) | ||
|
||
doc: $(apidoc_dirs) $(apiassets) $(apidocs) tools/doc/ $(NODE_EXE) | ||
doc-only: $(apidoc_dirs) $(apiassets) $(apidocs) tools/doc/ | ||
|
||
doc: $(NODE_EXE) doc-only | ||
|
||
$(apidoc_dirs): | ||
mkdir -p $@ | ||
|
@@ -269,11 +271,11 @@ out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/ | |
out/doc/%: doc/% | ||
cp -r $< $@ | ||
|
||
out/doc/api/%.json: doc/api/%.md $(NODE_EXE) | ||
out/doc/api/%.json: doc/api/%.md | ||
$(NODE) tools/doc/generate.js --format=json $< > $@ | ||
|
||
out/doc/api/%.html: doc/api/%.md $(NODE_EXE) | ||
$(NODE) tools/doc/generate.js --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 $< > $@ | ||
|
||
docopen: out/doc/api/all.html | ||
-google-chrome out/doc/api/all.html | ||
|
@@ -663,5 +665,5 @@ endif | |
blog blogclean tar binary release-only bench-http-simple bench-idle \ | ||
bench-all bench bench-misc bench-array bench-buffer bench-net \ | ||
bench-http bench-fs bench-tls cctest run-ci test-v8 test-v8-intl \ | ||
test-v8-benchmarks test-v8-all v8 lint-ci bench-ci jslint-ci \ | ||
test-v8-benchmarks test-v8-all v8 lint-ci bench-ci jslint-ci doc-only \ | ||
$(TARBALL)-headers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NODE=/path/to/node
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback. I'm going to suggest that the current version is more ideal because I expect the 80% case (really more like 99.9%) when doing
make doc-only
is that the user wants to use thenode
in their path. I did include this note right underneath that:That could be expanded if it's not clear enough:
I suggested the possibility of
npm run doc
for the 80% case and if that happened I could see documenting it like that: