Skip to content

Commit 9ab2e21

Browse files
mahmoud-moursybengl
authored andcommitted
doc: make minor fixes to contributing guides
PR-URL: #41966 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Derek Lewis <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 3a03e27 commit 9ab2e21

File tree

2 files changed

+27
-18
lines changed

2 files changed

+27
-18
lines changed

doc/contributing/maintaining-the-build-files.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ There are three main build files that may be directly run when building Node.js:
1313
create platform-dependent build files. Its output is usually in one of these
1414
formats: Makefile, MSbuild, ninja, or XCode project files (the main
1515
Makefile mentioned below is maintained separately by humans). For a detailed
16-
guide on this script, see [configure](#configure).
16+
guide on this script, see [configure][].
1717
* `vcbuild.bat`: A Windows Batch Script that locates build tools, provides a
18-
subset of the targets available in the [Makefile](#makefile), and a few
18+
subset of the targets available in the [Makefile][], and a few
1919
targets of its own. For a detailed guide on this script, see
2020
[vcbuild.bat](#vcbuildbat).
2121
* `Makefile`: A Makefile that can be run with GNU Make. It provides a set of
2222
targets that build and test the Node.js binary, produce releases and
2323
documentation, and interact with the CI to run benchmarks or tests. For a
24-
detailed guide on this file, see [Makefile](#makefile).
24+
detailed guide on this file, see [Makefile][].
2525

26-
On Windows `vcbuild.bat` runs [configure](#configure) before building the
26+
On Windows `vcbuild.bat` runs [configure][] before building the
2727
Node.js binary, on other systems `configure` must be run manually before running
2828
`make` on the `Makefile`.
2929

@@ -58,3 +58,5 @@ maintained by humans. This is not usually run on Windows, where
5858
of this option.
5959

6060
[GYP]: https://gyp.gsrc.io/docs/UserDocumentation.md
61+
[Makefile]: #makefile
62+
[configure]: #configure

doc/contributing/maintaining-types-for-nodejs.md

+21-14
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
# Maintaining types for Node.js
22

3-
While JavaScript is an untyped language, there are a number of complementary
4-
technologies like [TypeScript](https://www.typescriptlang.org/) and
5-
[Flow](https://flow.org/) which allow developers to use types within their
6-
JavaScript projects. While many people don't use types, there are enough
7-
who do that the project has agreed it's important to work towards having
8-
[suitable types for end-users](https://github.com/nodejs/node/blob/master/doc/contributing/technical-priorities.md#suitable-types-for-end-users).
3+
While JavaScript is a weakly-typed language, there are some complementary tools
4+
like [TypeScript][] and [Flow][], which allow developers to annotate the source
5+
code of their JavaScript projects. While many people don't annotate their code,
6+
or make use of annotations at all, there are enough who do that the project has
7+
agreed it's important to work towards having [suitable types for end-users][].
98

109
## High level approach
1110

1211
There are a number of ways that types could be maintained for Node.js ranging
1312
from shipping them with the Node.js runtime to having them be externally
1413
maintained.
1514

16-
The different options were discussed as part of the
17-
[next-10](https://github.com/nodejs/next-10/blob/main/meetings/summit-nov-2021.md#suitable-types-for-end-users)
18-
effort and it was agreed that maintaining them externally is the best approach.
15+
The different options were discussed as part of the [next-10][] effort and it
16+
was agreed that maintaining them externally is the best approach.
1917
Some of the advantages to this approach include:
2018

2119
* Node.js maintainers do not need to be familiar with any given type
@@ -34,22 +32,22 @@ The agreement was that the ideal flow would be as follows:
3432

3533
When you run `make doc` the canonical markdown files used to
3634
document the Node.js APIs in the
37-
[doc/api](https://github.com/nodejs/node/tree/master/doc/api)
35+
[doc/api][]
3836
directory are converted to both an `.html` file and a `.json` file.
3937

4038
As part of the regular build/release process both the `html` and
41-
`json` files are published to [nodejs.org](https://nodejs.org/en/docs/).
39+
`json` files are published to [nodejs.org][].
4240

4341
The generator that does the conversion is in the
44-
[tools/doc](https://github.com/nodejs/node/tree/master/tools/doc)
42+
[tools/doc][]
4543
directory.
4644

4745
## Markdown structure
4846

4947
The constraints required on the markdown files in the
50-
[doc/api](https://github.com/nodejs/node/tree/master/doc/api) directory
48+
[doc/api][] directory
5149
in order to be able to generate the JSON files are defined in the
52-
[documentation-style-guide](https://github.com/nodejs/node/blob/master/doc/README.md#documentation-style-guide).
50+
[documentation-style-guide][].
5351

5452
## Planned changes (as of Jan 1 2022)
5553

@@ -61,3 +59,12 @@ afterwards.
6159
There is an ongoing effort to add additional markdown constraints and
6260
then update the flow in order to be able to generate a better
6361
JSON output.
62+
63+
[Flow]: https://flow.org/
64+
[TypeScript]: https://www.typescriptlang.org/
65+
[doc/api]: https://github.com/nodejs/node/tree/HEAD/doc/api
66+
[documentation-style-guide]: https://github.com/nodejs/node/blob/HEAD/doc/README.md#documentation-style-guide
67+
[next-10]: https://github.com/nodejs/next-10/blob/HEAD/meetings/summit-nov-2021.md#suitable-types-for-end-users
68+
[nodejs.org]: https://nodejs.org/en/docs/
69+
[suitable types for end-users]: https://github.com/nodejs/node/blob/HEAD/doc/contributing/technical-priorities.md#suitable-types-for-end-users
70+
[tools/doc]: https://github.com/nodejs/node/tree/HEAD/tools/doc

0 commit comments

Comments
 (0)