Going 4.0.0

This commit is contained in:
raub 2018-08-31 16:26:52 +03:00
parent 110d80dd59
commit 193931995c
5 changed files with 21 additions and 11 deletions

View File

@ -1,9 +1,10 @@
sudo: false
sudo: true
dist: trusty
language: node_js
node_js:
- "8.11.1"
- "8.11.4"
addons:
@ -20,7 +21,7 @@ before_install:
export CXX="clang++-3.5";
export CC="clang-3.5";
fi;
- npm install -g npm@5.6.0
- npm install -g npm@6.4.0
install:

View File

@ -6,6 +6,8 @@ This is a part of [Node3D](https://github.com/node-3d) project.
![Build Status](https://api.travis-ci.org/node-3d/addon-tools-raub.svg?branch=master)
> npm i -s addon-tools-raub
## Synopsis
@ -15,7 +17,7 @@ Helpers for Node.js addons and dependency packages:
* `EventEmitter` C++ implementation.
* C++ macros and shortcuts.
* Crossplatform commands for GYP: `cp`, `rm`, `mkdir`.
* Regarded platforms: win x32/x64, linux x32/x64, mac x64.
* Regarded platforms: win x32/x64, linux x64, mac x64.
Useful links: [V8 Ref](https://v8.paulfryzel.com/docs/master/),
[Nan Docs](https://github.com/nodejs/nan#api),
@ -136,7 +138,6 @@ would encourage you to abide by the following rules:
* bin-win32
* bin-win64
* bin-linux32
* bin-linux64
* bin-mac64
@ -515,7 +516,7 @@ NAN_METHOD(test) {
...
```
NOTE: The conversion from `Nan::Utf8String` to `std::string` (via `char *`)
> Note: The conversion from `Nan::Utf8String` to `std::string` (via `char *`)
is possible with unary `*` operator.
</details>

View File

@ -18,8 +18,16 @@ const prefixName = name => `bin-${name}`;
const getPlatformDir = platform => {
switch (platform) {
case 'win32' : return process.arch === 'x64' ? 'win64' : 'win32';
case 'linux' : return process.arch === 'x64' ? 'linux64' : 'linux32';
case 'darwin' : return 'mac64';
case 'linux' :
if (process.arch === 'x32') {
throw new Error('Linux x32 not supported since 4.0.0.');
}
return 'linux64';
case 'darwin' :
if (process.arch === 'x32') {
throw new Error('Mac x32 not supported.');
}
return 'mac64';
default : throw new Error(`Platform "${platform}" is not supported.`);
}
};

View File

@ -1,7 +1,7 @@
{
"author": "Luis Blanco <luisblanco1337@gmail.com>",
"name": "addon-tools-raub",
"version": "3.0.0",
"version": "4.0.0",
"description": "Helpers for Node.js addons and dependency packages",
"license": "MIT",
"main": "index.js",
@ -19,7 +19,7 @@
"gyp"
],
"engines": {
"node": ">=8.11.2",
"node": ">=8.11.4",
"npm": ">=5.6.0"
},
"maintainers": [
@ -34,6 +34,6 @@
"url": "https://github.com/node-3d/addon-tools-raub.git"
},
"dependencies": {
"nan": "~2.10.0"
"nan": "2.11.0"
}
}