-
Notifications
You must be signed in to change notification settings - Fork 112
Open
Labels
Description
Sometimes we don't need information about all coins, maybe we should write package generator that produce next file structure:
root
- index.js
- bitcoin
- index.js
- mainnet
- index.js
- bitcore.json
- bitcoinjs.json
so if we want only information about bitcoin mainnet for bitcoinjs-lib we can write one of this require:
requrie('coininfo').bitcoin.mainnet.bitcoinjsrequire('coininfo/bitcoin').mainnet.bitcoinjsrequire('coininfo/bitcoin/mainnet').bitcoinjsrequire('coininfo/bitcoin/mainnet/bitcoinjs')
pros:
- no dependencies
- no overhead for handling all files on require, only json files (with index.js that require them)
- less bundle size with browserify if you need only specific coin/net
cons:
- somebody should write generator 😆