⬆️ 🎨 Transfer to Node3D
This commit is contained in:
parent
69e624ffdb
commit
b37add7c1b
|
@ -2,8 +2,10 @@
|
||||||
.cproject
|
.cproject
|
||||||
.project
|
.project
|
||||||
.lock-wscript
|
.lock-wscript
|
||||||
|
build*/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Debug
|
Debug/
|
||||||
node_modules
|
node_modules/
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
binary/
|
||||||
*.log
|
*.log
|
||||||
|
|
11
.npmignore
11
.npmignore
|
@ -1,14 +1,15 @@
|
||||||
*.log
|
*.log
|
||||||
.cproject
|
.cproject
|
||||||
.DS_Store
|
|
||||||
.eslintrc
|
.eslintrc
|
||||||
.gitignore
|
.gitignore
|
||||||
.idea
|
.idea
|
||||||
.lock-wscript
|
.lock-wscript
|
||||||
.project
|
.project
|
||||||
|
binary/
|
||||||
|
build*/
|
||||||
CPPLINT.cfg
|
CPPLINT.cfg
|
||||||
Debug
|
Debug/
|
||||||
examples
|
examples/
|
||||||
node_modules
|
|
||||||
package-lock.json
|
package-lock.json
|
||||||
test
|
test/
|
||||||
|
qt/
|
||||||
|
|
|
@ -74,6 +74,8 @@ public:
|
||||||
Nan::SetPrototypeMethod(proto, "setMaxListeners", jsSetMaxListeners);
|
Nan::SetPrototypeMethod(proto, "setMaxListeners", jsSetMaxListeners);
|
||||||
Nan::SetPrototypeMethod(proto, "rawListeners", jsRawListeners);
|
Nan::SetPrototypeMethod(proto, "rawListeners", jsRawListeners);
|
||||||
|
|
||||||
|
Nan::SetPrototypeMethod(proto, "destroy", jsDestroy);
|
||||||
|
|
||||||
// -------- static
|
// -------- static
|
||||||
|
|
||||||
V8_VAR_FUNC ctor = Nan::GetFunction(proto).ToLocalChecked();
|
V8_VAR_FUNC ctor = Nan::GetFunction(proto).ToLocalChecked();
|
||||||
|
@ -141,8 +143,14 @@ public:
|
||||||
|
|
||||||
|
|
||||||
void _destroy() { DES_CHECK;
|
void _destroy() { DES_CHECK;
|
||||||
|
|
||||||
_isDestroyed = true;
|
_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:
|
private:
|
||||||
|
|
||||||
bool _isDestroyed;
|
bool _isDestroyed;
|
||||||
|
|
2
index.js
2
index.js
|
@ -36,7 +36,7 @@ const paths = dir => {
|
||||||
const binPath = `${dir}/${currentDir}`;
|
const binPath = `${dir}/${currentDir}`;
|
||||||
|
|
||||||
if (isWindows) {
|
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(' ');
|
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",
|
"name": "addon-tools-raub",
|
||||||
"version": "0.1.7",
|
"version": "0.1.7",
|
||||||
"author": "Luis Blanco <raubtierxxx@gmail.com>",
|
|
||||||
"description": "A set of extra tools for Node.js addons",
|
"description": "A set of extra tools for Node.js addons",
|
||||||
|
"license": "MIT",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"node",
|
"support",
|
||||||
"addon",
|
"headers",
|
||||||
"header",
|
|
||||||
"include",
|
"include",
|
||||||
"platform",
|
|
||||||
"build",
|
|
||||||
"paths",
|
|
||||||
"events",
|
|
||||||
"eventemitter",
|
"eventemitter",
|
||||||
"emitter",
|
|
||||||
"cpp",
|
|
||||||
"compile",
|
|
||||||
"macros",
|
|
||||||
"helpers",
|
|
||||||
"utils"
|
"utils"
|
||||||
],
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8.11.1",
|
||||||
|
"npm": ">=5.6.0"
|
||||||
|
},
|
||||||
"maintainers": [
|
"maintainers": [
|
||||||
{
|
{
|
||||||
"name": "Luis Blanco",
|
"name": "Luis Blanco",
|
||||||
"email": "raubtierxxx@gmail.com",
|
"email": "luisblanco1337@gmail.com",
|
||||||
"skype": "rauber666"
|
"skype": "rauber666"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/raub/node-addon-tools.git"
|
"url": "https://github.com/node-3d/node-addon-tools.git"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nan": "2.10.0"
|
"nan": "2.10.0"
|
||||||
|
|
|
@ -1,38 +1,17 @@
|
||||||
{
|
{
|
||||||
"name": "TEST",
|
"name": "test",
|
||||||
"author": "Luis Blanco <raubtierxxx@gmail.com>",
|
"version": "0.0.0",
|
||||||
"description": "TEST",
|
"private": true,
|
||||||
"version": "0.0.1",
|
"main": "mocha",
|
||||||
"main": "mocha",
|
"scripts": {
|
||||||
"scripts": {
|
"test": "mocha",
|
||||||
"test": "mocha",
|
"start": "mocha",
|
||||||
"start": "mocha"
|
"preinstall": "cd .. && npm i"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"dependencies": {
|
||||||
"node",
|
"addon-tools-raub": "file:../",
|
||||||
"addon",
|
"chai": "^4.1.2",
|
||||||
"header",
|
"mocha": "^5.0.0",
|
||||||
"include",
|
"sinon": "^4.2.2"
|
||||||
"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"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue