From cb007f48e56ef414552586acfa578deebe00b877 Mon Sep 17 00:00:00 2001 From: Kai Hao Date: Thu, 9 Jan 2020 20:00:50 +0800 Subject: [PATCH] Update comments wording Co-Authored-By: Brody McKee --- packages/create-react-app/createReactApp.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/create-react-app/createReactApp.js b/packages/create-react-app/createReactApp.js index 1ae658a24f1..4d39b208767 100755 --- a/packages/create-react-app/createReactApp.js +++ b/packages/create-react-app/createReactApp.js @@ -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}`; } }