diff --git a/README.md b/README.md index fddf0a59..fd0defee 100644 --- a/README.md +++ b/README.md @@ -7,19 +7,19 @@ Implementations of examples are named either after Node.js versions (`node_0.10` `node_0.12`, etc), or Node.js addon implementation APIs: - [`nan`](https://github.com/nodejs/nan): C++-based abstraction between Node and direct V8 APIs. -- [`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. -- [`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. +- [`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.) +- [`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. Implementations against unsupported versions of Node.js are provided for completeness and historical context. They are not maintained. -The examples are primarily maintained for N-API and node-addon-api and as outlined in +The examples are primarily maintained for Node-API and node-addon-api and as outlined in the Node.js [documentation](https://nodejs.org/dist/latest/docs/api/addons.html), unless there is a need for direct access to functionality which -is not exposed by N-API, use N-API. +is not exposed by Node-API, use Node-API. -The [N-API Resource](http://nodejs.github.io/node-addon-examples/) offers an -excellent orientation and tips for developers just getting started with N-API +The [Node-API Resource](http://nodejs.github.io/node-addon-examples/) offers an +excellent orientation and tips for developers just getting started with Node-API and `node-addon-api`. ## Usage diff --git a/a-first-project/node-addon-api/README.md b/a-first-project/node-addon-api/README.md index 865c497c..fb54a3f0 100644 --- a/a-first-project/node-addon-api/README.md +++ b/a-first-project/node-addon-api/README.md @@ -1,8 +1,8 @@ -# N-API A First Project +# Node-API A First Project -This is an example project that accompanies the N-API workshop tutorials +This is an example project that accompanies the Node-API workshop tutorials -A tutorial describing this project can be found at the [N-API Resource](https://napi.inspiredware.com/getting-started/first.html). +A tutorial describing this project can be found at the [Node-API Resource](https://napi.inspiredware.com/getting-started/first.html). To build and run this program on your system, clone it to your computer and run these two commands inside your clone: diff --git a/async_work_promise/napi/binding.c b/async_work_promise/napi/binding.c index e43dbde7..703f65a9 100644 --- a/async_work_promise/napi/binding.c +++ b/async_work_promise/napi/binding.c @@ -96,7 +96,7 @@ static napi_value StartWork(napi_env env, napi_callback_info info) { // Create a string to describe this asynchronous operation. CHECK(napi_create_string_utf8(env, - "N-API Deferred Promise from Async Work Item", + "Node-API Deferred Promise from Async Work Item", NAPI_AUTO_LENGTH, &work_name) == napi_ok); diff --git a/async_work_thread_safe_function/napi/binding.c b/async_work_thread_safe_function/napi/binding.c index 66fdef05..16b26144 100644 --- a/async_work_thread_safe_function/napi/binding.c +++ b/async_work_thread_safe_function/napi/binding.c @@ -146,7 +146,7 @@ static napi_value StartThread(napi_env env, napi_callback_info info) { // Create a string to describe this asynchronous operation. status = napi_create_string_utf8(env, - "N-API Thread-safe Call from Async Work Item", + "Node-API Thread-safe Call from Async Work Item", NAPI_AUTO_LENGTH, &work_name); assert(status == napi_ok); diff --git a/build_with_cmake/README.md b/build_with_cmake/README.md index 6aa66ea6..f7d5c18e 100644 --- a/build_with_cmake/README.md +++ b/build_with_cmake/README.md @@ -1,8 +1,8 @@ -## Building N-API Addons Using CMake.js +## Building Node-API Addons Using CMake.js ### Examples -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). +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). These example projects assume that CMake.js has been installed globally: @@ -22,12 +22,12 @@ Complete CMake.js documentation can be found on the [CMake.js GitHub repository] ### NAPI_VERSION -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: +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: ``` add_definitions(-DNAPI_VERSION=3) ``` -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. +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. -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. \ No newline at end of file +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. \ No newline at end of file diff --git a/build_with_cmake/napi/package.json b/build_with_cmake/napi/package.json index 7186c576..10f23730 100644 --- a/build_with_cmake/napi/package.json +++ b/build_with_cmake/napi/package.json @@ -1,7 +1,7 @@ { "name": "build-napi-with-cmake", "version": "0.0.0", - "description": "Build N-API native addon with CMake.", + "description": "Build Node-API native addon with CMake.", "main": "hello.js", "private": true, "dependencies": { diff --git a/build_with_cmake/node-addon-api/CMakeLists.txt b/build_with_cmake/node-addon-api/CMakeLists.txt index 8763274b..4d4e1ef2 100644 --- a/build_with_cmake/node-addon-api/CMakeLists.txt +++ b/build_with_cmake/node-addon-api/CMakeLists.txt @@ -9,7 +9,7 @@ add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES} ${CMAKE_JS_SRC}) set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node") target_link_libraries(${PROJECT_NAME} ${CMAKE_JS_LIB}) -# Include N-API wrappers +# Include Node-API wrappers execute_process(COMMAND node -p "require('node-addon-api').include" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE NODE_ADDON_API_DIR diff --git a/build_with_cmake/node-addon-api/package.json b/build_with_cmake/node-addon-api/package.json index dca91ace..6aedf0d0 100644 --- a/build_with_cmake/node-addon-api/package.json +++ b/build_with_cmake/node-addon-api/package.json @@ -1,7 +1,7 @@ { "name": "build-node-addon-api-with-cmake", "version": "0.0.0", - "description": "Build N-API native addon with CMake and node-addon-api C++ wrapper.", + "description": "Build Node-API native addon with CMake and node-addon-api C++ wrapper.", "main": "hello.js", "private": true, "dependencies": { diff --git a/napi-asyncworker-example/node-addon-api/README.md b/napi-asyncworker-example/node-addon-api/README.md index fff65af2..b9827629 100644 --- a/napi-asyncworker-example/node-addon-api/README.md +++ b/napi-asyncworker-example/node-addon-api/README.md @@ -1,8 +1,8 @@ -# N-API AsyncWorker Example +# Node-API AsyncWorker Example -This is an example project showing how to use the Node.js N-API AsyncWorker class +This is an example project showing how to use the Node.js Node-API AsyncWorker class -A tutorial describing this project can be found at the [N-API Resource](https://napi.inspiredware.com/special-topics/asyncworker.html). +A tutorial describing this project can be found at the [Node-API Resource](https://napi.inspiredware.com/special-topics/asyncworker.html). To build and run this program on your system, clone it to your computer and run these two commands inside your clone: diff --git a/napi-asyncworker-example/node-addon-api/package.json b/napi-asyncworker-example/node-addon-api/package.json index 08679f6e..c5d3cf0e 100644 --- a/napi-asyncworker-example/node-addon-api/package.json +++ b/napi-asyncworker-example/node-addon-api/package.json @@ -1,6 +1,6 @@ { "name": "napi-asyncworker-example", - "description": "An example project showing how to use the Node.js N-API AsyncWorker class", + "description": "An example project showing how to use the Node.js Node-API AsyncWorker class", "version": "1.0.0", "main": "test/Test.js", "dependencies": { diff --git a/object-wrap-demo/node-addon-api/README.md b/object-wrap-demo/node-addon-api/README.md index fb3656c4..464a4fd8 100644 --- a/object-wrap-demo/node-addon-api/README.md +++ b/object-wrap-demo/node-addon-api/README.md @@ -1,8 +1,8 @@ -# N-API Object Wrap Demo +# Node-API Object Wrap Demo -This is an example project that accompanies the N-API workshop tutorials +This is an example project that accompanies the Node-API workshop tutorials -A tutorial describing this project can be found at the [N-API Resource](https://napi.inspiredware.com/getting-started/objectwrap.html). +A tutorial describing this project can be found at the [Node-API Resource](https://napi.inspiredware.com/getting-started/objectwrap.html). To build and run this program on your system, clone it to your computer and run these two commands inside your clone: diff --git a/typescript_with_addon/node-addon-api/CMakeLists.txt b/typescript_with_addon/node-addon-api/CMakeLists.txt index 5be6255e..7f23c6c1 100644 --- a/typescript_with_addon/node-addon-api/CMakeLists.txt +++ b/typescript_with_addon/node-addon-api/CMakeLists.txt @@ -10,7 +10,7 @@ add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES} ${CMAKE_JS_SRC}) set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node") target_link_libraries(${PROJECT_NAME} ${CMAKE_JS_LIB}) -# Include N-API wrappers +# Include Node-API wrappers execute_process(COMMAND node -p "require('node-addon-api').include" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE NODE_ADDON_API_DIR diff --git a/website/README.md b/website/README.md index e578a1e8..e4a1fb24 100644 --- a/website/README.md +++ b/website/README.md @@ -1,6 +1,6 @@ -# The N-API Resource +# The Node-API Resource -This directory contains the Markdown and supporting files that comprise the N-API Resource website published at the following URL by GitHub Pages: +This directory contains the Markdown and supporting files that comprise the Node-API Resource website published at the following URL by GitHub Pages: https://nodejs.github.io/node-addon-examples/ @@ -8,7 +8,7 @@ The website is generated by [Gatsby](https://www.gatsbyjs.org) and published to ## Objective -The basic objective of this site is to publish additional useful information concerning the N-API technology that extends beyond the basic documentation. +The basic objective of this site is to publish additional useful information concerning the Node-API technology that extends beyond the basic documentation. Ideally, pages published to this site should reference a working demo module that is also stored in this same repository. Features configured into the Gatsby project make embedding example source code fairly straightforward. diff --git a/website/gatsby-config.js b/website/gatsby-config.js index 317156e1..02d52f47 100644 --- a/website/gatsby-config.js +++ b/website/gatsby-config.js @@ -2,13 +2,13 @@ module.exports = { siteMetadata: { - title: 'The N-API Resource', - sidebarTitle: 'N-API Resource', - description: 'Tutorials and more for Node.js N-API.', + title: 'The Node-API Resource', + sidebarTitle: 'Node-API Resource', + description: 'Tutorials and more for Node.js Node-API.', siteUrl: 'https://github.com/nodejs/node-addon-examples', keywords: 'node nodejs n-api napi tutorials native-addon', author: { - name: 'The N-API Team', + name: 'The Node-API Team', url: 'https://github.com/nodejs/node-addon-examples', email: '' } diff --git a/website/package.json b/website/package.json index f37639f3..4522fb2e 100644 --- a/website/package.json +++ b/website/package.json @@ -1,8 +1,8 @@ { "name": "napi-resource", - "description": "Tutorials and more for Node.js N-API.", + "description": "Tutorials and more for Node.js Node-API.", "version": "1.0.0", - "author": "The N-API Team", + "author": "The Node-API Team", "keywords": [ "node", "nodejs",