From 117cc88acb2758ff6468d5fd552c4a8c5d1eaf87 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Thu, 2 Jan 2020 02:40:52 +0800 Subject: [PATCH] Split sqlite3-binding.js out so that it could be override by webpack options. --- lib/sqlite3-binding.js | 5 +++++ lib/sqlite3.js | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 lib/sqlite3-binding.js diff --git a/lib/sqlite3-binding.js b/lib/sqlite3-binding.js new file mode 100644 index 000000000..065f59576 --- /dev/null +++ b/lib/sqlite3-binding.js @@ -0,0 +1,5 @@ +var binary = require('node-pre-gyp'); +var path = require('path'); +var binding_path = binary.find(path.resolve(path.join(__dirname,'../package.json'))); +var binding = require(binding_path); +module.exports = exports = binding; diff --git a/lib/sqlite3.js b/lib/sqlite3.js index c8e3e8c6c..403a66144 100644 --- a/lib/sqlite3.js +++ b/lib/sqlite3.js @@ -1,8 +1,5 @@ -var binary = require('node-pre-gyp'); var path = require('path'); -var binding_path = binary.find(path.resolve(path.join(__dirname,'../package.json'))); -var binding = require(binding_path); -var sqlite3 = module.exports = exports = binding; +var sqlite3 = require('./sqlite3-binding.js'); var EventEmitter = require('events').EventEmitter; function normalizeMethod (fn) {