Skip to content

package generator #22

@fanatid

Description

@fanatid

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 😆

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions