Open JasonEtco opened 4 years ago
Weβre definitely interested in a PR to fix this! I think your proposed change makes sense. We already leave the template name alone if it starts with cra-template
so this would probably just be another check in that same function.
Looks like that's here:
PR incoming πͺ
@iansu / @ianschmitz any interest in picking this back up? Looks like the PR was opened and just never reviewed. Was automatically closed due to inactivity? I'd really like to use the result of the PR (#8167) if possible. Even happy to jump in and open a new PR if you think it will end up getting merged. Let me know!
@JasonEtco does this work with a mono repo where the template is sitting in sub-directory of the repository not in the root?
Describe the bug
Hey folks π I'm not positive that this is a bug, talking with @iansu this seems to be more of a feature that doesn't (yet!) exist. I was wondering if
--template owner/repo
would work in the same way asnpm i owner/repo
, where it looks for a package on GitHub. For example:Would grab the code, as-is, from
master
of this repo.Environment
Steps to reproduce
npx create-react-app wheeler-mode --template iansu/cra-template-wheeler-mode
Any
owner/repo
string should work in the same way!Expected behavior
I'd expect
yarn
to resolve the template similar to how it grabs it fromnpm
, when given anowner/repo
string that maps to a GitHub repository. Aside from being able to function similar toyarn
under the hood, this even enables private templates by implementing existinggit
credentials π πActual behavior
Here's the output:
Worth noting that
yarn
tried to clone the GitHub repo, but got the SSH URL wrong:Should be:
Let me know how I can help! If y'all are open to a PR here, my first inclination would be to look for
/
in the provided template string and just not prependcra-template
before giving it over toyarn
.