Skip to content

Commit

Permalink
Merge branch 'gh-i' of https://github.com/crypti/cryptocurrencies int…
Browse files Browse the repository at this point in the history
…o gh-i
  • Loading branch information
brh55 committed Jan 28, 2018
2 parents aaa63c2 + f01eb79 commit 78384a9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"scripts": {
"test": "xo && ava",
"build": "rm -rf images && mkdir images && node build.js",
"fast-build": "node build.js"
"fast-build": "node build.js"
},
"files": [
"cryptocurrencies.json",
Expand Down
22 changes: 14 additions & 8 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,22 @@ $ npm install --save cryptocurrencies
```js
const cryptocurrencies = require('cryptocurrencies');

cryptocurrencies.BTC.name;
cryptocurrencies.BTC;
//=> 'Bitcoin'

cryptocurrencies.BTC.imageUrl;
cryptocurrencies.symbols();
//=> ['42', ... 'BTC', 'ETH', 'LTC', ...]
```

Want more meta information? Download the [cryptocurrencies-meta.json](https://github.com/crypti/cryptocurrencies/blob/master/cryptocurrencies-meta.json) and import it to your project.

```js
const cryptocurrenciesMeta = require('./cryptocurrencies-meta.json');
cryptocurrenciesMeta.BTC.imageUrl;
//=> 'https://raw.githubusercontent.com/crypti/cryptocurrencies/master/images/BTC.png'

cryptocurrencies.BTC.iconUrl;
cryptocurrenciesMeta.BTC.iconUrl;
//=> 'https://raw.githubusercontent.com/crypti/cryptocurrencies/master/images/BTC-128.png'

cryptocurrencies.symbols();
//=> ['42', ... 'BTC', 'ETH', 'LTC', ...]
```

## Cryptocurrencies
Expand All @@ -49,8 +54,9 @@ and can be updated automatically by running:
$ npm run build
```

:bulb: Note that this build routine synchronously downloads the currency icons and saves them to the `images` directory. This means
that the build routine takes a few minutes, since it has to process thousands of images.
> :bulb: **Important**
>
> The standard build routine synchronously downloads the currency icons and saves them to the `images` directory. This means that the build routine takes a few minutes, since it has to process thousands of images. Use `npm run fast-build` to skip existing images that may have already been downloaded.
## License

Expand Down

0 comments on commit 78384a9

Please sign in to comment.