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

build: how to build and test docs on Windows #19330

Closed
vsemozhetbyt opened this issue Mar 13, 2018 · 1 comment
Closed

build: how to build and test docs on Windows #19330

vsemozhetbyt opened this issue Mar 13, 2018 · 1 comment
Labels
build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. test Issues and PRs related to the tests. windows Issues and PRs related to the Windows platform.

Comments

@vsemozhetbyt
Copy link
Contributor

vsemozhetbyt commented Mar 13, 2018

This is a small how-to note on the mentioned topic.

Currently, there is no task like doc-only in the vcbuild.bat, and the test for doc building result is skipped on Windows.

However, sometimes it is needed to quickly test some doc changes for a PR locally on Windows, maybe without building the node (~ 1 hour with 100% dual-core CPU on my machine).

It turns out to be not so difficult to build and test docs on Windows. However, the process has some quirks.

  1. Add make to common Git Bash tools for Windows.

  2. Unfortunately, a simple command NODE=/path/to/node make doc-only recommended in BUILDING.md works only if node is located deeper than the PWD path because of this macro in the doc-only task flow (it seems this caution is valid for Linux too).

    If the path to node has no spaces, we can call with this relative path (supposing the project root is something like d:\node-fork\):

    $ NODE=../../C/nodejs/node.exe make doc-only

    If the path to node has spaces (like the default "C:\Program Files\nodejs\node.exe"), we have a problem with make. However, we can temporarily locate node in PWD, so this simple hack works:

    $ cp "`where node`" node.exe && NODE=node.exe MAKE=make make doc-only && rm node.exe

    We should define MAKE=make if the path to make also has spaces (which is default: c:\Program Files\Git\mingw64\bin\make.exe).

  3. Finally, we can just comment out the skipping in test/doctool/test-make-doc.js and test the result.

@vsemozhetbyt vsemozhetbyt added doc Issues and PRs related to the documentations. windows Issues and PRs related to the Windows platform. build Issues and PRs related to build files or the CI. test Issues and PRs related to the tests. labels Mar 13, 2018
@vsemozhetbyt
Copy link
Contributor Author

Ref: #19663

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. doc Issues and PRs related to the documentations. test Issues and PRs related to the tests. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

1 participant