Skip to content

Commit 23ce3b1

Browse files
authored
docs: language & formatting improvements (#1679)
1 parent 60d439e commit 23ce3b1

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

doc/node-gyp.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ C++ code needs to be compiled into executable form whether it be as an object
44
file to linked with others, a shared library, or a standalone executable.
55

66
The main reason for this is that we need to link to the Node.js dependencies and
7-
headers correctly, another reason is that we need a cross platform way to build
7+
headers correctly. Another reason is that we need a cross-platform way to build
88
C++ source into binary for the target platform.
99

10-
Until now **node-gyp** is the **de-facto** standard build tool for writing
11-
Node.js addons. It's based on Google's **gyp** build tool, which abstract away
12-
many of the tedious issues related to cross platform building.
10+
**node-gyp** remains the **de-facto** standard build tool for writing
11+
Node.js addons. It's based on Google's **gyp** build tool, which abstracts away
12+
many of the tedious issues related to cross-platform building.
1313

14-
**node-gyp** uses a file called ```binding.gyp``` that is located on the root of
14+
**node-gyp** uses a file called `binding.gyp` that is located in the root of
1515
your addon project.
1616

17-
```binding.gyp``` file, contains all building configurations organized with a
18-
JSON like syntax. The most important parameter is the **target** that must be
19-
set to the same value used on the initialization code of the addon as in the
17+
The `binding.gyp` file contains all building configurations organized with a
18+
JSON-like syntax. The most important parameter is the **target** that must be
19+
set to the same value used in the initialization code of the addon, as in the
2020
examples reported below:
2121

2222
### **binding.gyp**
@@ -41,8 +41,8 @@ examples reported below:
4141
// ...
4242

4343
/**
44-
* This code is our entry-point. We receive two arguments here, the first is the
45-
* environment that represent an independent instance of the JavaScript runtime,
44+
* This code is our entry point. We receive two arguments here: the first is the
45+
* environment that represent an independent instance of the JavaScript runtime;
4646
* the second is exports, the same as module.exports in a .js file.
4747
* You can either add properties to the exports object passed in or create your
4848
* own exports object. In either case you must return the object to be used as
@@ -56,7 +56,7 @@ Napi::Object Init(Napi::Env env, Napi::Object exports) {
5656
}
5757

5858
/**
59-
* This code defines the entry-point for the Node addon, it tells Node where to go
59+
* This code defines the entry point for the Node addon. It tells Node where to go
6060
* once the library has been loaded into active memory. The first argument must
6161
* match the "target" in our *binding.gyp*. Using NODE_GYP_MODULE_NAME ensures
6262
* that the argument will be correct, as long as the module is built with
@@ -75,8 +75,8 @@ NODE_API_MODULE(NODE_GYP_MODULE_NAME, Init)
7575
- [Command options](https://www.npmjs.com/package/node-gyp#command-options)
7676
- [Configuration](https://www.npmjs.com/package/node-gyp#configuration)
7777

78-
Sometimes finding the right settings for ```binding.gyp``` is not easy so to
79-
accomplish at most complicated task please refer to:
78+
Sometimes finding the right settings for `binding.gyp` is not easy, so to
79+
accomplish the most complicated tasks, please refer to:
8080

8181
- [GYP documentation](https://gyp.gsrc.io/index.md)
82-
- [node-gyp wiki](https://github.com/nodejs/node-gyp/wiki)
82+
- [node-gyp wiki](https://github.com/nodejs/node-gyp/tree/main/docs)

0 commit comments

Comments
 (0)