Rich-Harris / degit

Straightforward project scaffolding
MIT License
6.86k stars 240 forks source link

Support gists #21

Open tivac opened 6 years ago

tivac commented 6 years ago

Gists are just git repos under the covers, but degit doesn't seem to understand their git repo URLs.

> degit https://gist.github.com/5e392a94903989cdc5fc786c2bc585eb.git test
[!] could not parse https://gist.github.com/5e392a94903989cdc5fc786c2bc585eb.git

Am I doing this wrong? It seems like it should work, at least in theory.

Rich-Harris commented 6 years ago

Support for different services (GitHub, GitLab and BitBucket) is hardcoded in at the moment. Unfortunately it's not quite as straightforward as just allowing any repo URL, since the archive URL for a given repo seems to vary from service to service.

Would definitely welcome a PR for this though! 😀

Am curious about your use case? degit was written with the assumption that people would type out degit user/repo, which is obviously impractical with gist IDs.

See also #19 and #20.

tivac commented 6 years ago

I was hoping to be able to do degit https://gist.github.com/tivac/5e392a94903989cdc5fc786c2bc585eb <folder> to quickly suck down a gist w/ a minimum of fuss. This particular use-case came up when wanting to create a repro for a rollup issue I ran into.

tivac commented 5 years ago

Just ran into this again, for the record. Funnily enough it's again for trying to create a simple repro for rollup.

millette commented 5 years ago

The hosted-git-info package might help.