Skip to content

Feat: Configure fetch destination #8

@lukeed

Description

@lukeed

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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions