paypro: make example work without npm install.
This commit is contained in:
parent
8c74b94791
commit
85e769b97d
|
@ -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;
|
||||
|
|
|
@ -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" }
|
||||
}
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue