Fix tv build (#53)

* fix: export USE_MARKETS

* fix: update tsconfig to prevent TV charts build issue + update readme
This commit is contained in:
DR497 2020-12-04 15:38:35 +08:00 committed by GitHub
parent cd85aa2b76
commit c7fece4345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View File

@ -29,6 +29,12 @@ It is possible to add OHLCV candles built from on chain data using [Bonfida's AP
3. Import `TVChartContainer` from `/src/components/TradingView` and add it to your `TradePage.tsx`. The TradingView widget will work out of the box using [Bonfida's](https://bonfida.com) datafeed.
4. Remove the following from the `tsconfig.json`
```json
"./src/components/TradingView/index.tsx"
```
<p align="center">
<img height="300" src="https://i.imgur.com/UyFKmTv.png">
</p>

View File

@ -45,7 +45,7 @@ import BonfidaApi from './bonfidaConnector';
// Used in debugging, should be false in production
const _IGNORE_DEPRECATED = false;
const USE_MARKETS: MarketInfo[] = _IGNORE_DEPRECATED
export const USE_MARKETS: MarketInfo[] = _IGNORE_DEPRECATED
? MARKETS.map((m) => ({ ...m, deprecated: false }))
: MARKETS;

View File

@ -20,5 +20,10 @@
"lib": ["dom", "esnext"]
},
"include": ["./src/"],
"exclude": ["./src/**/*.test.js", "node_modules", "**/node_modules"]
"exclude": [
"./src/**/*.test.js",
"node_modules",
"**/node_modules",
"./src/components/TradingView/index.tsx"
]
}