cryptocoinjs/coininfo

package generator

fanatid opened this issue · 0 comments

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.bitcoinjs
  • require('coininfo/bitcoin').mainnet.bitcoinjs
  • require('coininfo/bitcoin/mainnet').bitcoinjs
  • require('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 😆