⬆️ 🎨 Transfer to Node3D
This commit is contained in:
parent
69e624ffdb
commit
b37add7c1b
|
@ -2,8 +2,10 @@
|
|||
.cproject
|
||||
.project
|
||||
.lock-wscript
|
||||
build*/
|
||||
.DS_Store
|
||||
Debug
|
||||
node_modules
|
||||
Debug/
|
||||
node_modules/
|
||||
package-lock.json
|
||||
binary/
|
||||
*.log
|
||||
|
|
11
.npmignore
11
.npmignore
|
@ -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/
|
||||
|
|
|
@ -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;
|
||||
|
|
2
index.js
2
index.js
|
@ -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(' ');
|
||||
|
|
26
package.json
26
package.json
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue