From ebdcb3fb246a9543756da0ebe97dc8d801a54c2b Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Fri, 2 Jun 2017 12:01:32 -0400 Subject: [PATCH 1/2] doc: add ref to option to enable n-api Since its guarded in by a command line option say that in the docs and provide the option that needs to be used to enable it. --- doc/api/n-api.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index fe3786aaaf5a3f..ea3884d65d22b6 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -11,6 +11,13 @@ changes in the underlying JavaScript engine and allow modules compiled for one version to run on later versions of Node.js without recompilation. +As the feature is currently experimental it must be enabled with the +following command line option: + +```bash +--napi-modules +``` + Addons are built/packaged with the same approach/tools outlined in the section titled [C++ Addons](addons.html). The only difference is the set of APIs that are used by the native code. From da0c8aeeef79b0ff1412d7dc289f70bafc7c9333 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Mon, 5 Jun 2017 09:56:24 -0400 Subject: [PATCH 2/2] squash: address comments --- doc/api/n-api.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index ea3884d65d22b6..ebe23a4eda9610 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -11,13 +11,6 @@ changes in the underlying JavaScript engine and allow modules compiled for one version to run on later versions of Node.js without recompilation. -As the feature is currently experimental it must be enabled with the -following command line option: - -```bash ---napi-modules -``` - Addons are built/packaged with the same approach/tools outlined in the section titled [C++ Addons](addons.html). The only difference is the set of APIs that are used by the native code. @@ -67,6 +60,14 @@ For example: #include ``` +As the feature is experimental it must be enabled with the +following command line +[option](https://nodejs.org/dist/latest-v8.x/docs/api/cli.html#cli_napi_modules): + +```bash +--napi-modules +``` + ## Basic N-API Data Types N-API exposes the following fundamental datatypes as abstractions that are