Skip to content

Commit

Permalink
directly use the node-webkit's version if runtime === 'node-webkit'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mithgol committed Jul 25, 2014
1 parent 4584ffb commit 53f3e38
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/util/versioning.js
@@ -1,23 +1,17 @@

module.exports = exports;

var path = require('path')
, semver = require('semver')
, url = require('url')
, abi_crosswalk = require('./abi_crosswalk.json')
, nw_crosswalk = require('./nw_crosswalk.json')


function get_node_abi(runtime, target) {
if (target) {
// abi_crosswalk generated with ./scripts/abi_crosswalk.js
var abi = '';
if (runtime === 'node-webkit') {
var node_version = nw_crosswalk[target];
if (!node_version) {
throw new Error("node-webkit version '"+target+"' not supported");
}
abi = abi_crosswalk[node_version].node_abi;
return runtime + '-nw' + target;
} else {
if (abi_crosswalk[target]) {
abi = abi_crosswalk[target].node_abi;
Expand Down

0 comments on commit 53f3e38

Please sign in to comment.