Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package generator #22

Open
fanatid opened this issue Mar 23, 2016 · 0 comments
Open

package generator #22

fanatid opened this issue Mar 23, 2016 · 0 comments

Comments

@fanatid
Copy link
Member

fanatid commented Mar 23, 2016

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 😆
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant