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

Refactor files for more modularity and easy of adding more #75

Closed
hacdias opened this issue Aug 3, 2019 · 0 comments
Closed

Refactor files for more modularity and easy of adding more #75

hacdias opened this issue Aug 3, 2019 · 0 comments

Comments

@hacdias
Copy link
Member

hacdias commented Aug 3, 2019

As I was making #73, I had the idea of restructuring the directories in the following way:

  • bin/ - as it is right now.
  • src/
    • index.js - move from the root.
    • dnslink/
      • cloudflare.js
      • sth-else.js
    • pinners/
      • infura.js
      • pinata.js
      • ipfs-cluster.js
      • sth-else.js

From dnslink, all files would export the same api:

updateSomethingDns(options)

From pinners, all files would export the same api:

// Setup Pinner
const pinner = setupPinnerName(options)

// Pin from file system
const hash = await pinner.pin(dir, options)

// Pin hash
await pinner.pinHash(hash, options)

Otherwise:

// Setup Pinner
const pin = setupPinnerName(options)

// Pin from file system
const hash = await pin(dir, options)
@hacdias hacdias changed the title Refactor files for more modularity Refactor files for more modularity and easy of adding more Aug 3, 2019
@hacdias hacdias closed this as completed Aug 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant