The Wayback Machine - https://web.archive.org/web/20220424080813/https://github.com/nodejs/node/pull/9436
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

Copy link
Contributor

@thefourtheye thefourtheye commented Nov 3, 2016

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 label Nov 3, 2016
@nodejs-github-bot nodejs-github-bot added the build label Nov 3, 2016
@jasnell
Copy link
Member

@jasnell jasnell commented Nov 3, 2016

docopen or doc-only?

@danbev
Copy link
Member

@danbev 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

@thefourtheye thefourtheye commented Nov 5, 2016

@jasnell This actually improves docopen only.

@thefourtheye
Copy link
Contributor Author

@thefourtheye thefourtheye commented Nov 5, 2016

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

@danbev
Copy link
Member

@danbev danbev commented Nov 5, 2016

Copy link
Contributor

@silverwind silverwind left a comment

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

@silverwind silverwind Nov 11, 2016

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

@thefourtheye thefourtheye Nov 12, 2016

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

@silverwind silverwind Nov 13, 2016

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

@thefourtheye thefourtheye Nov 14, 2016

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

@thefourtheye thefourtheye commented Nov 14, 2016

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

@thefourtheye
Copy link
Contributor Author

@thefourtheye thefourtheye commented Nov 17, 2016

Landed in c5678d3

@thefourtheye thefourtheye deleted the doc-open-in-makefile branch Nov 17, 2016
thefourtheye added a commit that referenced this issue 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 issue Nov 17, 2016
Building node binary is not necessary for doc builds.

Refer: nodejs#9436 (comment)
addaleax pushed a commit that referenced this issue 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 issue 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 issue 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 issue 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 issue 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 MylesBorins mentioned this pull request Dec 21, 2016
@MylesBorins MylesBorins mentioned this pull request Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.