diff options
author | Derek Lewis <DerekNonGeneric@inf.is> | 2020-08-30 15:52:17 +0300 |
---|---|---|
committer | Derek Lewis <DerekNonGeneric@inf.is> | 2020-09-06 23:25:49 +0300 |
commit | ff0aad0f747470d33d85fba4deb795a79c55c1a6 (patch) | |
tree | a0bdbc63344c8bff3511d0bf6748619f38acbdc9 /BUILDING.md | |
parent | 8ae2f479549be295250867d20cfe17ceb68f72c4 (diff) |
doc: spruce up user journey to local docs browsing
This patch improves the means by which the docs are viewed locally.
* Remove extraneous code in the `docserve` Makefile target
* Document the `docserve` task for all to know
* Bring all code snippets in this section up to speed
* Clarify the purpose of each documentation browsing method
Fixes: https://github.com/nodejs/node/issues/34977
PR-URL: https://github.com/nodejs/node/pull/34986
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Diffstat (limited to 'BUILDING.md')
-rw-r--r-- | BUILDING.md | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/BUILDING.md b/BUILDING.md index 9f5f2c193fd..d25d92fbfaa 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -417,41 +417,51 @@ To build the documentation: This will build Node.js first (if necessary) and then use it to build the docs: -```console -$ make doc +```bash +make doc ``` If you have an existing Node.js build, you can build just the docs with: -```console -$ NODE=/path/to/node make doc-only +```bash +NODE=/path/to/node make doc-only ``` -To read the documentation: +To read the man page: -```console -$ man doc/node.1 +```bash +man doc/node.1 ``` -If you prefer to read the documentation in a browser, -run the following after `make doc` is finished: +If you prefer to read the full documentation in a browser, run the following. -```console -$ make docopen +```bash +make docserve ``` -This will open a browser with the documentation. +This will spin up a static file server and provide a URL to where you may browse +the documentation locally. + +If you're comfortable viewing the documentation using the program your operating +system has associated with the default web browser, run the following. + +```bash +make docopen +``` + +This will open a file URL to a one-page version of all the browsable HTML +documents using the default browser. To test if Node.js was built correctly: -```console -$ ./node -e "console.log('Hello from Node.js ' + process.version)" +```bash +./node -e "console.log('Hello from Node.js ' + process.version)" ``` To install this version of Node.js into a system directory: -```console -$ [sudo] make install +```bash +[sudo] make install ``` #### Building a debug build |