LiteLoaderBDS-1.16.40/Tools/ScriptX/test/node_addon/README.md
2023-03-03 10:18:21 -08:00

11 lines
392 B
Markdown

**demo project showing how to use ScriptX to build `node.js` addon**
1. use cmake-js to build `node.js` addon
2. write CMakeLists.txt using cmake-js. see `CMakeLists.txt` for detail.
2. inside the initializer, use special `V8Engine` constructor. see `src/addon.cc` for detail.
3. build and run using
```bash
npm i -g cmake-js # install cmake-js
npm run test # build & run test
```