diff --git a/README.md b/README.md index cdde45cac..4156b574a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,22 @@ -# Node.js API (NAPI) C++ Wrapper +# Node.js API (N-API) Package -This repo contains header-only C++ wrapper classes for the C APIs for the ABI Stable Node API project (NAPI). +This package contains header-only C++ wrapper classes for the ABI-stable +Node.js API (N-API). -See the [main project README](https://github.com/nodejs/abi-stable-node/blob/doc/README.md) for more details. +To use these headers in a native module: + 1. Add a dependency on this package to `package.json`. + 2. Reference this package's include directory in `binding.gyp`: +```gyp +{ + 'target_name': 'example_module', + 'include_dirs': ["= 52; + +module.exports = { + include: include, + isNodeApiBuiltin: isNodeApiBuiltin, +}; diff --git a/package.json b/package.json new file mode 100644 index 000000000..b007b084f --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "bugs": { + "url": "https://github.com/nodejs/node-api/issues" + }, + "dependencies": {}, + "description": "Node.js API (N-API)", + "devDependencies": { + }, + "directories": {}, + "homepage": "https://github.com/nodejs/node-api", + "license": "MIT", + "main": "index.js", + "name": "node-api", + "optionalDependencies": {}, + "readme": "README.md", + "repository": { + "type": "git", + "url": "git://github.com/nodejs/node-api.git" + }, + "scripts": { + }, + "version": "0.1.0" +}