docs: fix some casing inconsistencies (#7081)

This commit is contained in:
Joshua Chen 2022-03-31 20:23:44 +08:00 committed by GitHub
parent 24c205a835
commit ff96606865
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 97 additions and 97 deletions

View file

@ -55,12 +55,12 @@ function findPackageManagerFromUserAgent():
async function askForPackageManagerChoice(): Promise<SupportedPackageManager> {
const hasYarn = shell.exec('yarn --version', {silent: true}).code === 0;
const hasPNPM = shell.exec('pnpm --version', {silent: true}).code === 0;
const hasPnpm = shell.exec('pnpm --version', {silent: true}).code === 0;
if (!hasYarn && !hasPNPM) {
if (!hasYarn && !hasPnpm) {
return 'npm';
}
const choices = ['npm', hasYarn && 'yarn', hasPNPM && 'pnpm']
const choices = ['npm', hasYarn && 'yarn', hasPnpm && 'pnpm']
.filter((p): p is string => Boolean(p))
.map((p) => ({title: p, value: p}));
@ -165,7 +165,7 @@ async function copyTemplate(
}
await fs.copy(path.resolve(templatesDir, template), dest, {
// Symlinks don't exist in published NPM packages anymore, so this is only
// Symlinks don't exist in published npm packages anymore, so this is only
// to prevent errors during local testing
filter: async (filePath) => !(await fs.lstat(filePath)).isSymbolicLink(),
});
@ -337,7 +337,7 @@ export default async function init(
// Docusaurus templates.
if (useTS) {
if (!(await hasTS(template))) {
logger.error`Template name=${template} doesn't provide the Typescript variant.`;
logger.error`Template name=${template} doesn't provide the TypeScript variant.`;
process.exit(1);
}
template = `${template}${TypeScriptTemplateSuffix}`;