diff --git a/examples/PayPro/customer.js b/examples/PayPro/customer.js index 3fa871163..375f3e37c 100644 --- a/examples/PayPro/customer.js +++ b/examples/PayPro/customer.js @@ -29,7 +29,9 @@ if (isNode) { * Dependencies */ -var bitcore = require('bitcore'); +var bitcore = isNode + ? require('../../') + : require('bitcore'); var PayPro = bitcore.PayPro; var Transaction = bitcore.Transaction; var TransactionBuilder = bitcore.TransactionBuilder; diff --git a/examples/PayPro/package.json b/examples/PayPro/package.json deleted file mode 100644 index 12afe215f..000000000 --- a/examples/PayPro/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "payment-server", - "description": "Payment Protocol (BIP-70) for Bitcoin", - "author": "Christopher Jeffrey", - "version": "0.0.0", - "main": "./index.js", - "bin": "./index.js", - "preferGlobal": false, - "repository": "git://github.com/bitpay/bitcore.git", - "homepage": "https://github.com/bitpay/bitcore", - "bugs": { "url": "https://github.com/bitpay/bitcore/issues" }, - "keywords": ["bitcoin", "bip-70", "payment", "protocol"], - "tags": ["bitcoin", "bip-70", "payment", "protocol"], - "dependencies": { - "express": "4.6.1", - "request": "2.39.0", - "optimist": "0.6.1" - }, - "engines": { "node": ">= 0.10.0" } -} diff --git a/examples/PayPro/server.js b/examples/PayPro/server.js index 165faf85c..cdf233d41 100755 --- a/examples/PayPro/server.js +++ b/examples/PayPro/server.js @@ -25,7 +25,7 @@ process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'; var argv = require('optimist').argv; var express = require('express'); -var bitcore = require('bitcore'); +var bitcore = require('../../'); var PayPro = bitcore.PayPro; var Transaction = bitcore.Transaction; @@ -316,8 +316,7 @@ app.use(express.static(__dirname)); * Helpers */ -var bitcorePath = path.dirname(require.resolve('bitcore/package.json')); -var log = require(bitcorePath + '/util/log'); +var log = require('../../util/log'); log.err = error; log.debug = error; diff --git a/package.json b/package.json index 871eefd91..7845396c6 100644 --- a/package.json +++ b/package.json @@ -114,6 +114,9 @@ "node": ">=0.10" }, "devDependencies": { - "sinon": "^1.10.3" + "sinon": "^1.10.3", + "express": "4.6.1", + "request": "2.39.0", + "optimist": "0.6.1" } }