Skip to content

Commit

Permalink
Update comments wording
Browse files Browse the repository at this point in the history
Co-Authored-By: Brody McKee <mrmckeb@users.noreply.github.com>
  • Loading branch information
kevin940726 and mrmckeb committed Jan 9, 2020
1 parent cb3e5be commit cb007f4
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/create-react-app/createReactApp.js
Expand Up @@ -644,17 +644,19 @@ function getTemplateInstallPackage(template, originalDirectory) {
templateName === templateToInstall ||
templateName.startsWith(`${templateToInstall}-`)
) {
// cra-template
// @SCOPE/cra-template
// cra-template-NAME
// @SCOPE/cra-template-NAME
// Covers:
// - cra-template
// - @SCOPE/cra-template
// - cra-template-NAME
// - @SCOPE/cra-template-NAME
templateToInstall = `${scope}${templateName}`;
} else if (templateName.startsWith('@')) {
// @SCOPE
// Covers using @SCOPE only
templateToInstall = `${templateName}/${templateToInstall}`;
} else {
// NAME
// @SCOPE/NAME
// Covers templates without the `cra-template` prefix:
// - NAME
// - @SCOPE/NAME
templateToInstall = `${scope}${templateToInstall}-${templateName}`;
}
}
Expand Down

0 comments on commit cb007f4

Please sign in to comment.