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

doc: spruce up user journey to local docs browsing #34986

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 24 additions & 15 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,41 +417,50 @@ 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
after `make doc` is finished:

```console
$ make docopen
```bash
make docserve
```

This will provide a URL to where you may browse the documentation locally.

If you prefer to read the documentation as a one-page version of all the
DerekNonGeneric marked this conversation as resolved.
Show resolved Hide resolved
browsable HTML documents, run the following after `make doc` is finished:

```bash
make docopen
```

This will open a browser with the documentation.

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
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,7 @@ docopen: $(apidocs_html)

.PHONY: docserve
docserve: $(apidocs_html)
DerekNonGeneric marked this conversation as resolved.
Show resolved Hide resolved
@$(PYTHON) -mwebbrowser http://localhost:8000/all.html
DerekNonGeneric marked this conversation as resolved.
Show resolved Hide resolved
@$(PYTHON) -m http.server -d $(PWD)/out/doc/api
@$(PYTHON) -m http.server 8000 --bind 127.0.0.1 --directory out/doc/api

.PHONY: docclean
docclean:
Expand Down