Build system for node.js native addons
This will only build c/c++ files in src
directory.
npm i --save naio nan
Check out the example above
- Install
- Add to package.json
- "libraries": ["v8", "all-other-libraries-you-need"]
- "scripts": {"build": "make -f node_modules/naio/makefile", "postinstall": "npm run build"}
- Execute
npm run build
- Now you can require/import like this
- var mylibrary = require('./build/debug.node') // or release.node
- import mylibrary from './build/debug.node'; // or release.node