Skip to content

Commit

Permalink
Fix npm package
Browse files Browse the repository at this point in the history
  • Loading branch information
Cayle Sharrock committed Aug 29, 2017
1 parent 5379064 commit a975433
Show file tree
Hide file tree
Showing 13 changed files with 84 additions and 31 deletions.
10 changes: 7 additions & 3 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
node_modules/
*.d.ts
*.log
*.tgz

!index.d.ts
!index.ref.d.ts
!build/
!types/
docs/apiref

src/
npm-shrinkwrap.json
yarn.lock
tsconfig.json
4 changes: 2 additions & 2 deletions docs/pages/gtt/gtt_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ node.js and don't want to, or can't switch to Typescript, then that's not a prob

In either case, you can install the GTT by executing

yarn add gdax-tt
yarn add gdax-trading-toolkit
// or if you're using npm
npm i gdax-tt
npm i gdax-trading-toolkit

(we're using [Yarn](https://yarnpkg.com/) here, which is essentially a 1:1 drop-in replacement for npm with a whole host
benefits. If you don't use yarn, that's fine, the `npm` commands are typically identical)
Expand Down
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"name": "gdax-trading-toolkit",
"version": "0.1.0",
"version": "0.1.8",
"description": "A trading toolkit for building advanced trading bots on the GDAX platform",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"scripts": {
"lint": "tslint -c tslint.json -p . -t stylish",
"pretest": "yarn run build",
"build": "tsc -p .",
"build": "tsc -d -p .",
"coverage": "yarn run build && ./node_modules/.bin/nyc --reporter text-summary ./node_modules/.bin/mocha",
"coverage:report": "./node_modules/.bin/nyc report --reporter text-summary --reporter html && open coverage/index.html",
"test:mocha": "./node_modules/.bin/mocha",
"test": "yarn run lint && yarn run test:mocha",
"clean": "rm -fr build coverage .nyc_output",
"postinstall": "yarn run build",
"doc": "./node_modules/.bin/typedoc --options typedoc.json ."
"doc": "./node_modules/.bin/typedoc --options typedoc.json .",
"prepublishOnly": "yarn run build"
},
"bin": {
"gdaxConsole": "./build/src/console/gdaxConsole.js"
"gdaxConsole": "./build/src/consoles/gdaxConsole.js"
},
"repository": {
"type": "git",
Expand All @@ -34,6 +34,19 @@
"author": "Cayle Sharrock <[email protected]>",
"license": "Apache-2.0",
"dependencies": {
"@types/bignumber.js": "4.0.2",
"@types/bintrees": "1.0.2",
"@types/commander": "2.3.31",
"@types/crypto-js": "3.1.32",
"@types/mocha": "2.2.33",
"@types/nock": "8.2.0",
"@types/node": "6.0.51",
"@types/query-string": "3.0.30",
"@types/simple-mock": "0.0.27",
"@types/superagent": "2.0.35",
"@types/uuid": "2.0.29",
"@types/winston": "2.2.0",
"@types/ws": "0.0.37",
"bignumber.js": "4.0.2",
"bintrees": "1.0.1",
"commander": "2.9.0",
Expand All @@ -48,19 +61,6 @@
"ws": "1.1.1"
},
"devDependencies": {
"@types/bignumber.js": "4.0.2",
"@types/bintrees": "1.0.2",
"@types/commander": "2.3.31",
"@types/crypto-js": "3.1.32",
"@types/mocha": "2.2.33",
"@types/nock": "8.2.0",
"@types/node": "6.0.51",
"@types/query-string": "3.0.30",
"@types/simple-mock": "0.0.27",
"@types/superagent": "2.0.35",
"@types/uuid": "2.0.29",
"@types/winston": "2.2.0",
"@types/ws": "0.0.37",
"expect.js": "0.3.1",
"mocha": "3.2.0",
"nock": "9.0.2",
Expand Down
19 changes: 19 additions & 0 deletions src/FXService/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export * from './FXService';
export * from './FXRateCalculator';
export * from './FXProvider';

import * as CoinMarketCapProvider from './providers/CoinMarketCapProvider';
import * as OpenExchangeProvider from './providers/OpenExchangeProvider';
import * as YahooFXProvider from './providers/YahooFXProvider';

export const Providers = {
CoinMarketCapProvider,
OpenExchangeProvider,
YahooFXProvider
};

import SimpleRateCalculator from './calculators/SimpleRateCalculator';

export const Calculators = {
SimpleRateCalculator
};
9 changes: 9 additions & 0 deletions src/core/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export * from './ExchangeRateFilter';
export * from './HFTFilter';
export * from './LiveOrderbook';
export * from './MessageQueue';
export * from './Messages';
export * from './ProductFilter';
export * from './RateLimiter';
export * from './Trader';
export * from './Triggers';
4 changes: 4 additions & 0 deletions src/exchanges/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from './ExchangeFeed';
export * from './bitfinex/BitfinexFeed';
export * from './gdax/GDAXFeed';
export * from './poloniex/PoloniexFeed';
7 changes: 7 additions & 0 deletions src/factories/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,10 @@ export { GDAX };

import * as Bitfinex from './bitfinexFactories';
export { Bitfinex };

/**
* Poloniex factories
*/

import * as Poloniex from './bitfinexFactories';
export { Poloniex };
12 changes: 7 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
* License for the specific language governing permissions and limitations under the License. *
***************************************************************************************************************************/

export { BookBuilder } from './lib/BookBuilder';
export { LiveOrderbook } from './core/LiveOrderbook';
export { BitfinexConfig, BitfinexExchangeAPI } from './exchanges/bitfinex/BitfinexExchangeAPI';
export { GDAXConfig, GDAXExchangeAPI } from './exchanges/gdax/GDAXExchangeAPI';
export { Logger, ConsoleLoggerFactory } from './utils/Logger';
import * as Core from './core';
import * as Exchanges from './exchanges';
import * as Factories from './factories';
import * as FXService from './FXService';
import * as utils from './utils';
import * as lib from './lib';
export { Core, Exchanges, Factories, FXService, utils, lib };
2 changes: 1 addition & 1 deletion src/lib/math/BigArray.ts → src/lib/BigArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* License for the specific language governing permissions and limitations under the License. *
***************************************************************************************************************************/

import { Big, big, BigJS, Biglike, ONE, ZERO } from '../types';
import { Big, big, BigJS, Biglike, ONE, ZERO } from './types';

export default class BigArray {
static copy(a: BigArray) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/OrderbookUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import { Big, BigJS, Biglike, ONE, ZERO } from './types';
import { OrderbookState, PriceLevel } from './Orderbook';
import BigArray from './math/BigArray';
import BigArray from './BigArray';

export interface MarketOrderStats {
first_price: BigJS;
Expand Down
6 changes: 6 additions & 0 deletions src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export * from './AbstractMessageTransform';
export * from './BookBuilder';
export * from './Orderbook';
export * from './OrderbookDiff';
export * from './OrderbookUtils';
export * from './StaticCommandSet';
2 changes: 2 additions & 0 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './Logger';
export * from './printers';
2 changes: 1 addition & 1 deletion test/lib/BigArrayTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
***************************************************************************************************************************/

import { Big } from '../../src/lib/types';
import BigArray from '../../src/lib/math/BigArray';
import BigArray from '../../src/lib/BigArray';
const assert = require('assert');
const arr = [Big(2), Big(4), Big(6), Big(8)];

Expand Down

0 comments on commit a975433

Please sign in to comment.