Skip to content
This repository has been archived by the owner on Jun 6, 2021. It is now read-only.

Commit

Permalink
修正linux下BigNumber报错问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zlq4863947 committed Mar 9, 2018
1 parent 768e984 commit 6667617
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 18 deletions.
24 changes: 14 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"rm": "rimraf dist",
"format": "prettier --config .prettierrc --write \"src/**/*.ts\" \"test/**/*.ts\"",
"tsc": "npm run rm && tsc -p tsconfig.development.json",
"start": "npm run prepare && node dist/src/lib/bin/start.js",
"start:dev": "node dist/src/lib/bin/start.js",
"ws": "node dist/src/lib/bin/ws.js",
"start": "npm run prepare && node runner.js",
"start:dev": "node runner.js",
"ws": "node runner.js ws",
"tslint": "tslint --project ./tslint.json",
"db:serv": "node dist/test/pouchdb/serv.js",
"db:clie": "node dist/test/pouchdb/clie.js",
Expand All @@ -33,6 +33,7 @@
"cross-env": "^5.1.3",
"execution-time": "^1.2.0",
"express": "^4.16.2",
"glob": "^7.1.2",
"moment": "^2.20.1",
"pouchdb": "^6.4.3",
"pouchdb-find": "^6.4.3",
Expand All @@ -42,7 +43,6 @@
"winston": "^3.0.0-rc1"
},
"devDependencies": {
"@types/bignumber.js": "^5.0.0",
"@types/config": "0.0.33",
"@types/express": "^4.11.1",
"@types/mocha": "^2.2.41",
Expand All @@ -60,4 +60,4 @@
"tslint": "^5.6.0",
"typescript": "^2.6.1"
}
}
}
12 changes: 12 additions & 0 deletions runner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const glob = require("glob");
const path = require( 'path' );

var args = process.argv.splice(2);
let name = 'start';
if(args.length != 0) {
name = args[0];
}

glob.sync(`dist/**/${name}.js`).forEach( function( file ) {
require(path.resolve(file));
});
2 changes: 1 addition & 1 deletion src/lib/arbitrage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { logger, Helper } from './common';
import { Event } from './event';
import { Engine } from './engine';
import { Aggregator } from './aggregator';
import { BigNumber } from 'BigNumber.js';
import { BigNumber } from 'bignumber.js';
import * as types from './type';

const clc = require('cli-color');
Expand Down
2 changes: 1 addition & 1 deletion src/lib/common/helper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as types from '../type';
import { BigNumber } from 'BigNumber.js';
import { BigNumber } from 'bignumber.js';
import * as bitbank from 'bitbank-handler';

const ccxt = require('ccxt');
Expand Down
2 changes: 1 addition & 1 deletion src/lib/trading.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { logger, Helper } from './common';
import { BigNumber } from 'BigNumber.js';
import { BigNumber } from 'bignumber.js';
import { Bitbank } from 'bitbank-handler';
import * as types from './type';

Expand Down

0 comments on commit 6667617

Please sign in to comment.