-
Notifications
You must be signed in to change notification settings - Fork 147
Developer guide
Welcome to the guide for new developers on this project.
This module is a Node.js C++ addon. It is a mix of JavaScript (actually, LiveScript) and C++. The module is driven by the C++ code, which loads and registers the JavaScript code (see WebWorkerThreads.cc:Init).
The LiveScript files (X.ls) are the "master" versions of the JavaScript portion of the module. The JavaScript files (X.js) are generated automatically from their LiveScript equivalents, and the minified files (X.js.c) are the contents of the js files (each ASCII character is represented in hex). Minification makes it easier to work with the JS code in C++.
To change or extend the "JS-level" code, modify the LiveScript files, then run npm run js
to produce updated versions of the .js and .js.c files.
The C++ code uses NAN to reduce dependency on the V8 API.
See the tests/ subdir. What each test does is not well documented, nor is there a test matrix mapping module features to tests.
I don't know how to run the full test suite other than manually or with a bash script. npm test
only executes node test-package.js
, which is just a smoke test.