https://github.com/springmeyer/node-addon-example
Sample starter application for a Node C++ addon packaged with node-pre-gyp
https://github.com/springmeyer/node-addon-example
Last synced: about 1 year ago
JSON representation
Sample starter application for a Node C++ addon packaged with node-pre-gyp
- Host: GitHub
- URL: https://github.com/springmeyer/node-addon-example
- Owner: springmeyer
- License: bsd-2-clause
- Created: 2014-03-07T01:24:46.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2021-02-19T19:21:06.000Z (over 5 years ago)
- Last Synced: 2025-04-07T06:34:37.696Z (about 1 year ago)
- Language: Python
- Size: 16.6 KB
- Stars: 65
- Watchers: 0
- Forks: 18
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
node-addon-example
==================
[](https://www.travis-ci.com/springmeyer/node-addon-example)
Sample application of a Node C++ addon packaged with [node-pre-gyp](https://github.com/mapbox/node-pre-gyp).
If you are interested in learning how to write C++ addons see the [official guide](http://nodejs.org/api/addons.html#addons_hello_world).
This repo is intended as starter code for your own C++ module - feel free to copy and modify. The docs below are meant to be a template for how you might document your module once packaged with `node-pre-gyp`.
## Depends
- Node.js 0.10.x, 0.12.x, 4, or 5
## Install
Install from binary:
npm install
Install from source:
npm install --build-from-source
## Developing
The [node-pre-gyp](https://github.com/mapbox/node-pre-gyp#usage) tool is used to handle building from source and packaging.
Simply run:
./node_modules/.bin/node-pre-gyp build
### Packaging
./node_modules/.bin/node-pre-gyp build package
### Publishing
./node_modules/.bin/node-pre-gyp publish