Skip to content

Commit

Permalink
take off unneccessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
cfsghost committed Jun 21, 2017
1 parent 918a72e commit 631f8a8
Showing 1 changed file with 1 addition and 37 deletions.
38 changes: 1 addition & 37 deletions lib/core.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,7 @@

var fs = require('fs');
var os = require('os');
var path = require('path');
var binary = require('node-pre-gyp');
var binding_path = binary.find(path.resolve(path.join(__dirname, '..', 'package.json')));
var binding = require(binding_path);

var BrigCore = binding;
/*
try {
BrigCore = require(__dirname + '/../build/Release/brig.node');
} catch(err) {
// console.log(err);
}
if (!BrigCore) {
var apiVer = process.versions.modules;
var arch = process.arch;
// Support ARM architecture
if (arch == 'arm') {
arch += 'v' + process.config.variables.arm_version;
if (os.endianness() == 'LE') {
arch += 'l';
} else {
arch += 'b';
}
}
if (!BrigCore) {
try {
// Try to use the last version
BrigCore = require('../native/' + process.platform + '-' + arch + '-' + apiVer + '/brig.node');
} catch(err) {
throw new Error('Please use \'node-gyp rebuild\' to compile binary by yourself.');
}
}
}
*/

module.exports = BrigCore;
module.exports = binding;

0 comments on commit 631f8a8

Please sign in to comment.