-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
tools: improve docopen target in Makefile #9436
Conversation
|
LGTM |
2814d93
to
9c89d90
Compare
1. As it is, it just tries to build only the `all.html` file. If none of the other files are built already, generated page will not be good. To fix this, we process the assets and generate HTML files first. 2. After the HTML is generated, `google-chrome` is used to open the generated file in browser. This is not very portable as it might not be installed or installations might have used a different name. So, we use Python's webbrowser module to open the file.
9c89d90
to
31c40a7
Compare
@jasnell This actually improves |
@danbev Can you PTAL again? I changed it a little bit now. |
@thefourtheye LGTM |
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.
LGTM with suggestion
@@ -336,8 +335,8 @@ out/doc/api/%.html: doc/api/%.md | |||
fi | |||
[ -x $(NODE) ] && $(NODE) $(gen-html) || node $(gen-html) | |||
|
|||
docopen: out/doc/api/all.html | |||
-google-chrome out/doc/api/all.html | |||
docopen: $(apidocs_html) |
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.
Maybe rename these to doc-open
so it's consistent with doc-only
above?
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.
@silverwind Actually doc-only
is the odd man here I guess. Because we have docclean
as well :D
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.
Maybe we can sidestep this issue by makeing doc
do what doc-only
does now. The fact that doc
does a full build seems unexpected. Can be done in another PR I assume.
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.
@silverwind I agree.
Ping @nodejs/collaborators! I'll land this tomorrow if there are no objections. |
Landed in c5678d3 |
1. As it is, it just tries to build only the `all.html` file. If none of the other files are built already, generated page will not be good. To fix this, we process the assets and generate HTML files first. 2. After the HTML is generated, `google-chrome` is used to open the generated file in browser. This is not very portable as it might not be installed or installations might have used a different name. So, we use Python's webbrowser module to open the file. PR-URL: #9436 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Building node binary is not necessary for doc builds. Refer: nodejs#9436 (comment)
1. As it is, it just tries to build only the `all.html` file. If none of the other files are built already, generated page will not be good. To fix this, we process the assets and generate HTML files first. 2. After the HTML is generated, `google-chrome` is used to open the generated file in browser. This is not very portable as it might not be installed or installations might have used a different name. So, we use Python's webbrowser module to open the file. PR-URL: #9436 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
1. As it is, it just tries to build only the `all.html` file. If none of the other files are built already, generated page will not be good. To fix this, we process the assets and generate HTML files first. 2. After the HTML is generated, `google-chrome` is used to open the generated file in browser. This is not very portable as it might not be installed or installations might have used a different name. So, we use Python's webbrowser module to open the file. PR-URL: #9436 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
1. As it is, it just tries to build only the `all.html` file. If none of the other files are built already, generated page will not be good. To fix this, we process the assets and generate HTML files first. 2. After the HTML is generated, `google-chrome` is used to open the generated file in browser. This is not very portable as it might not be installed or installations might have used a different name. So, we use Python's webbrowser module to open the file. PR-URL: #9436 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
1. As it is, it just tries to build only the `all.html` file. If none of the other files are built already, generated page will not be good. To fix this, we process the assets and generate HTML files first. 2. After the HTML is generated, `google-chrome` is used to open the generated file in browser. This is not very portable as it might not be installed or installations might have used a different name. So, we use Python's webbrowser module to open the file. PR-URL: #9436 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
1. As it is, it just tries to build only the `all.html` file. If none of the other files are built already, generated page will not be good. To fix this, we process the assets and generate HTML files first. 2. After the HTML is generated, `google-chrome` is used to open the generated file in browser. This is not very portable as it might not be installed or installations might have used a different name. So, we use Python's webbrowser module to open the file. PR-URL: #9436 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Checklist
Affected core subsystem(s)
tools Makefile
Description of change
As it is, it just tries to build only the
all.html
file. If none ofthe other files are built already, generated page will not be good.
To fix this, we process the assets and generate HTML files first.
After the HTML is generated,
google-chrome
is used to open thegenerated file in browser. This is not very portable as it might not
be installed or installations might have used a different name. So,
we use Python's webbrowser module to open the file.
cc @nodejs/documentation @nodejs/build