Skip to content

Commit

Permalink
chore: clarify how to declare project as node-api to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Oct 29, 2023
1 parent 6a2a50b commit e112728
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Expand Up @@ -135,6 +135,14 @@ endif()
}
```

- Add the following into your package.json, using the same NAPI_VERSION value you provided to cmake

```json
"binary": {
"napi_versions": [7]
},
```

#### Commandline

With cmake-js installed as a depdendency or devDependency of your module, you can access run commands directly with:
Expand Down Expand Up @@ -302,6 +310,13 @@ you need to make your package depend on it with:

cmake-js will then add it to the include search path automatically

You should add the following to your package.json, with the correct version number, so that cmake-js knows the module is node-api and that it can skip downloading the nodejs headers

```json
"binary": {
"napi_versions": [7]
},
```

#### Electron

Expand Down

0 comments on commit e112728

Please sign in to comment.