⬆️ 🎨 Transfer to Node3D

This commit is contained in:
raub 2018-04-28 14:56:26 +03:00
parent 69e624ffdb
commit b37add7c1b
6 changed files with 54 additions and 61 deletions

6
.gitignore vendored
View File

@ -2,8 +2,10 @@
.cproject
.project
.lock-wscript
build*/
.DS_Store
Debug
node_modules
Debug/
node_modules/
package-lock.json
binary/
*.log

View File

@ -1,14 +1,15 @@
*.log
.cproject
.DS_Store
.eslintrc
.gitignore
.idea
.lock-wscript
.project
binary/
build*/
CPPLINT.cfg
Debug
examples
node_modules
Debug/
examples/
package-lock.json
test
test/
qt/

View File

@ -74,6 +74,8 @@ public:
Nan::SetPrototypeMethod(proto, "setMaxListeners", jsSetMaxListeners);
Nan::SetPrototypeMethod(proto, "rawListeners", jsRawListeners);
Nan::SetPrototypeMethod(proto, "destroy", jsDestroy);
// -------- static
V8_VAR_FUNC ctor = Nan::GetFunction(proto).ToLocalChecked();
@ -141,8 +143,14 @@ public:
void _destroy() { DES_CHECK;
_isDestroyed = true;
// emit("destroy");
_listeners.clear();
_raw.clear();
_wrappedIds.clear();
_rawIds.clear();
}
@ -644,6 +652,15 @@ private:
}
static NAN_METHOD(jsDestroy) { THIS_AUDIO_NODE; THIS_CHECK;
eventEmitter->emit("destroy");
eventEmitter->_destroy();
}
private:
bool _isDestroyed;

View File

@ -36,7 +36,7 @@ const paths = dir => {
const binPath = `${dir}/${currentDir}`;
if (isWindows) {
process.env.path = `${process.env.path ? `${process.env.path};` : ''}${binPath}`;
process.env.path = `${binPath};${process.env.path ? `${process.env.path}` : ''}`;
}
const remPath = remDirs.map(k => `${dir}/${k}`).join(' ');

View File

@ -1,37 +1,31 @@
{
"author": "Luis Blanco <luisblanco1337@gmail.com>",
"name": "addon-tools-raub",
"version": "0.1.7",
"author": "Luis Blanco <raubtierxxx@gmail.com>",
"description": "A set of extra tools for Node.js addons",
"license": "MIT",
"main": "index.js",
"keywords": [
"node",
"addon",
"header",
"support",
"headers",
"include",
"platform",
"build",
"paths",
"events",
"eventemitter",
"emitter",
"cpp",
"compile",
"macros",
"helpers",
"utils"
],
"engines": {
"node": ">=8.11.1",
"npm": ">=5.6.0"
},
"maintainers": [
{
"name": "Luis Blanco",
"email": "raubtierxxx@gmail.com",
"email": "luisblanco1337@gmail.com",
"skype": "rauber666"
}
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/raub/node-addon-tools.git"
"url": "https://github.com/node-3d/node-addon-tools.git"
},
"dependencies": {
"nan": "2.10.0"

View File

@ -1,38 +1,17 @@
{
"name": "TEST",
"author": "Luis Blanco <raubtierxxx@gmail.com>",
"description": "TEST",
"version": "0.0.1",
"main": "mocha",
"scripts": {
"test": "mocha",
"start": "mocha"
},
"keywords": [
"node",
"addon",
"header",
"include",
"platform",
"build",
"paths"
],
"maintainers": [
{
"name": "Luis Blanco",
"email": "raubtierxxx@gmail.com",
"skype": "rauber666"
}
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/raub/node-addon-tools.git"
},
"dependencies": {
"addon-tools-raub": "file:../",
"chai": "^4.1.2",
"mocha": "^5.0.0",
"sinon": "^4.2.2"
}
"name": "test",
"version": "0.0.0",
"private": true,
"main": "mocha",
"scripts": {
"test": "mocha",
"start": "mocha",
"preinstall": "cd .. && npm i"
},
"dependencies": {
"addon-tools-raub": "file:../",
"chai": "^4.1.2",
"mocha": "^5.0.0",
"sinon": "^4.2.2"
}
}