Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1.05 KB

README.md

File metadata and controls

41 lines (28 loc) · 1.05 KB

Requirements

  • cmake >= 2.8.12
  • swig >= 3.0.0
  • node >= 0.10.x < 4.9.0
  • npm
  • libpcre

Install

$ cmake -DENABLE_STATIC=ON -DGEN_LANGUAGE_BINDINGS=ON -DGEN_JAVASCRIPT_BINDINGS=ON ..
$ make
$ make install #necessary for plugin's
$ cd swig/javascript
$ npm install --unsafe-perm

Test

$ node test.js

SWIG

Current SWIG version does not support shared pointer. To correct that at the moment you need to do one thing:

  1. Use the latest SWIG master branch with the pull request Add shared pointer support in javascript.

You can build the JavaScript bindings inside docker, for that you can use the dockerfile, it is based on the dockerfile.

More details on SWIG's JavaScript bindings can be found at SWIG.

Usage

To include the node bindings simply use it with.

var yang = require("./index")