Skip to content
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

Closed

Conversation

thefourtheye
Copy link
Contributor

Checklist
  • commit message follows commit guidelines
Affected core subsystem(s)

tools Makefile

Description of change
  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.


cc @nodejs/documentation @nodejs/build

@thefourtheye thefourtheye added the tools Issues and PRs related to the tools directory. label Nov 3, 2016
@nodejs-github-bot nodejs-github-bot added the build Issues and PRs related to build files or the CI. label Nov 3, 2016
@jasnell
Copy link
Member

jasnell commented Nov 3, 2016

docopen or doc-only?

@danbev
Copy link
Contributor

danbev commented Nov 4, 2016

LGTM

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.
@thefourtheye
Copy link
Contributor Author

@jasnell This actually improves docopen only.

@thefourtheye
Copy link
Contributor Author

@danbev Can you PTAL again? I changed it a little bit now.

@danbev
Copy link
Contributor

danbev commented Nov 5, 2016

@thefourtheye LGTM

Copy link
Contributor

@silverwind silverwind left a 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)
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@silverwind I agree.

@thefourtheye
Copy link
Contributor Author

Ping @nodejs/collaborators! I'll land this tomorrow if there are no objections.

@thefourtheye
Copy link
Contributor Author

Landed in c5678d3

@thefourtheye thefourtheye deleted the doc-open-in-makefile branch November 17, 2016 11:55
thefourtheye added a commit that referenced this pull request Nov 17, 2016
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>
thefourtheye added a commit to thefourtheye/io.js that referenced this pull request Nov 17, 2016
Building node binary is not necessary for doc builds.

Refer: nodejs#9436 (comment)
addaleax pushed a commit that referenced this pull request Nov 22, 2016
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>
MylesBorins pushed a commit that referenced this pull request Dec 13, 2016
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>
MylesBorins pushed a commit that referenced this pull request Dec 13, 2016
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>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
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>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
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>
This was referenced Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants