Skip to content

Commit 82e0e96

Browse files
authored
doc: update doc references from N-API to Node-API (nodejs#176)
* Update doc references from N-API to Node-API
1 parent 64a179a commit 82e0e96

15 files changed

Lines changed: 36 additions & 36 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ Implementations of examples are named either after Node.js versions (`node_0.10`
77
`node_0.12`, etc), or Node.js addon implementation APIs:
88

99
- [`nan`](https://github.com/nodejs/nan): C++-based abstraction between Node and direct V8 APIs.
10-
- [`N-API`](https://nodejs.org/api/n-api.html): C-based API guaranteeing [ABI stability](https://nodejs.org/en/docs/guides/abi-stability/) across different node versions as well as JavaScript engines.
11-
- [`node-addon-api`](https://github.com/nodejs/node-addon-api): header-only C++ wrapper classes which simplify the use of the C-based N-API.
10+
- [`Node-API`](https://nodejs.org/api/n-api.html): C-based API guaranteeing [ABI stability](https://nodejs.org/en/docs/guides/abi-stability/) across different node versions as well as JavaScript engines. (Node-API was previously known as N-API.)
11+
- [`node-addon-api`](https://github.com/nodejs/node-addon-api): header-only C++ wrapper classes which simplify the use of the C-based Node-API.
1212

1313
Implementations against unsupported versions of Node.js are provided for
1414
completeness and historical context. They are not maintained.
1515

16-
The examples are primarily maintained for N-API and node-addon-api and as outlined in
16+
The examples are primarily maintained for Node-API and node-addon-api and as outlined in
1717
the Node.js [documentation](https://nodejs.org/dist/latest/docs/api/addons.html),
1818
unless there is a need for direct access to functionality which
19-
is not exposed by N-API, use N-API.
19+
is not exposed by Node-API, use Node-API.
2020

21-
The [N-API Resource](http://nodejs.github.io/node-addon-examples/) offers an
22-
excellent orientation and tips for developers just getting started with N-API
21+
The [Node-API Resource](http://nodejs.github.io/node-addon-examples/) offers an
22+
excellent orientation and tips for developers just getting started with Node-API
2323
and `node-addon-api`.
2424

2525
## Usage

a-first-project/node-addon-api/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# N-API A First Project
1+
# Node-API A First Project
22

3-
This is an example project that accompanies the N-API workshop tutorials
3+
This is an example project that accompanies the Node-API workshop tutorials
44

5-
A tutorial describing this project can be found at the [N-API Resource](https://napi.inspiredware.com/getting-started/first.html).
5+
A tutorial describing this project can be found at the [Node-API Resource](https://napi.inspiredware.com/getting-started/first.html).
66

77
To build and run this program on your system, clone it to your computer and run these two commands inside your clone:
88

async_work_promise/napi/binding.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static napi_value StartWork(napi_env env, napi_callback_info info) {
9696

9797
// Create a string to describe this asynchronous operation.
9898
CHECK(napi_create_string_utf8(env,
99-
"N-API Deferred Promise from Async Work Item",
99+
"Node-API Deferred Promise from Async Work Item",
100100
NAPI_AUTO_LENGTH,
101101
&work_name) == napi_ok);
102102

async_work_thread_safe_function/napi/binding.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static napi_value StartThread(napi_env env, napi_callback_info info) {
146146

147147
// Create a string to describe this asynchronous operation.
148148
status = napi_create_string_utf8(env,
149-
"N-API Thread-safe Call from Async Work Item",
149+
"Node-API Thread-safe Call from Async Work Item",
150150
NAPI_AUTO_LENGTH,
151151
&work_name);
152152
assert(status == napi_ok);

build_with_cmake/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
## Building N-API Addons Using CMake.js
1+
## Building Node-API Addons Using CMake.js
22

33
### Examples
44

5-
The objective of these examples is to demonstrate how to build N-API addons using [CMake.js](https://github.com/cmake-js/cmake-js#readme).
5+
The objective of these examples is to demonstrate how to build Node-API addons using [CMake.js](https://github.com/cmake-js/cmake-js#readme).
66

77
These example projects assume that CMake.js has been installed globally:
88

@@ -22,12 +22,12 @@ Complete CMake.js documentation can be found on the [CMake.js GitHub repository]
2222

2323
### NAPI_VERSION
2424

25-
When building N-API addons, it's important to specify to the build system the N-API version your code is designed to work with. With CMake.js, this information is specified in the `CMakeLists.txt` file:
25+
When building Node-API addons, it's important to specify to the build system the Node-API version your code is designed to work with. With CMake.js, this information is specified in the `CMakeLists.txt` file:
2626

2727
```
2828
add_definitions(-DNAPI_VERSION=3)
2929
```
3030

31-
Since N-API is ABI-stable, your N-API addon will work, without recompilation, with the N-API version you specify in `NAPI_VERSION` and all subsequent N-API versions.
31+
Since Node-API is ABI-stable, your Node-API addon will work, without recompilation, with the Node-API version you specify in `NAPI_VERSION` and all subsequent Node-API versions.
3232

33-
In the absence of a need for features available only in a specific N-API version, version 3 is a good choice as it is the version of N-API that was active when N-API left experimental status.
33+
In the absence of a need for features available only in a specific Node-API version, version 3 is a good choice as it is the version of Node-API that was active when Node-API left experimental status.

build_with_cmake/napi/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "build-napi-with-cmake",
33
"version": "0.0.0",
4-
"description": "Build N-API native addon with CMake.",
4+
"description": "Build Node-API native addon with CMake.",
55
"main": "hello.js",
66
"private": true,
77
"dependencies": {

build_with_cmake/node-addon-api/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES} ${CMAKE_JS_SRC})
99
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
1010
target_link_libraries(${PROJECT_NAME} ${CMAKE_JS_LIB})
1111

12-
# Include N-API wrappers
12+
# Include Node-API wrappers
1313
execute_process(COMMAND node -p "require('node-addon-api').include"
1414
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
1515
OUTPUT_VARIABLE NODE_ADDON_API_DIR

build_with_cmake/node-addon-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "build-node-addon-api-with-cmake",
33
"version": "0.0.0",
4-
"description": "Build N-API native addon with CMake and node-addon-api C++ wrapper.",
4+
"description": "Build Node-API native addon with CMake and node-addon-api C++ wrapper.",
55
"main": "hello.js",
66
"private": true,
77
"dependencies": {

napi-asyncworker-example/node-addon-api/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# N-API AsyncWorker Example
1+
# Node-API AsyncWorker Example
22

3-
This is an example project showing how to use the Node.js N-API AsyncWorker class
3+
This is an example project showing how to use the Node.js Node-API AsyncWorker class
44

5-
A tutorial describing this project can be found at the [N-API Resource](https://napi.inspiredware.com/special-topics/asyncworker.html).
5+
A tutorial describing this project can be found at the [Node-API Resource](https://napi.inspiredware.com/special-topics/asyncworker.html).
66

77
To build and run this program on your system, clone it to your computer and run these two commands inside your clone:
88

napi-asyncworker-example/node-addon-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "napi-asyncworker-example",
3-
"description": "An example project showing how to use the Node.js N-API AsyncWorker class",
3+
"description": "An example project showing how to use the Node.js Node-API AsyncWorker class",
44
"version": "1.0.0",
55
"main": "test/Test.js",
66
"dependencies": {

0 commit comments

Comments
 (0)