lukeed / lukeed/gittar

Feat: Configure `fetch` destination

Open
#8 0 comments 0 reactions 1 assignee View on GitHub

@lukeed is already working on this.

Since Feb 27, 2019.

enhancement
Dominant language
JavaScript
Stars
127
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Should add a new target option for the gittar.fetch method.

It should be a function that receives all the components from the parser ({ site, repo, type }) so that you have all the same information that gittar would use to compose a location.

When left unspecified, gittar will default to its current destination(s). But this gives a window for the caller to fully customize where the tarball is placed.

gittar.fetch('foo/bar', {
  target(info) {
    return path.join(__dirname, info.repo + '.tar.gz')
  }
})

This is a non-breaking way to handle #7. It also handles #5 in a different way.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.