Clarify create-next-app question wording (#66157)

### Why?

The current wording leaves room for questions/misinterpretations like:

- What does "use `src/`" mean? Does this affect my build, like compile
`src/*.ts` to `lib/*.js`?
- Oh, I can customize import aliases to use @ for project root instead
of doing relative everywhere? I'll choose Yes!

I think the proposed wording clarifies ^

---------

Co-authored-by: Sam Ko <sam@vercel.com>
This commit is contained in:
Loren ☺️ 2024-05-24 19:11:30 -04:00 committed by GitHub
parent b4eff7020b
commit a0911afbe0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View file

@ -28,10 +28,10 @@ What is your project named? my-app
Would you like to use TypeScript? No / Yes
Would you like to use ESLint? No / Yes
Would you like to use Tailwind CSS? No / Yes
Would you like to use `src/` directory? No / Yes
Would you like your code inside a `src/` directory? No / Yes
Would you like to use App Router? (recommended) No / Yes
Would you like to use Turbopack for `next dev`? No / Yes
Would you like to customize the default import alias (@/*)? No / Yes
Would you like to customize the import alias (`@/*` by default)? No / Yes
What import alias would you like configured? @/*
```

View file

@ -36,10 +36,10 @@ What is your project named? my-app
Would you like to use TypeScript? No / Yes
Would you like to use ESLint? No / Yes
Would you like to use Tailwind CSS? No / Yes
Would you like to use `src/` directory? No / Yes
Would you like your code inside a `src/` directory? No / Yes
Would you like to use App Router? (recommended) No / Yes
Would you like to use Turbopack for `next dev`? No / Yes
Would you like to customize the default import alias (@/*)? No / Yes
Would you like to customize the import alias (`@/*` by default)? No / Yes
```
Once you've answered the prompts, a new project will be created with the correct configuration depending on your answers.

View file

@ -376,7 +376,7 @@ async function run(): Promise<void> {
onState: onPromptState,
type: 'toggle',
name: 'srcDir',
message: `Would you like to use ${styledSrcDir}?`,
message: `Would you like your code inside a ${styledSrcDir}?`,
initial: getPrefOrDefault('srcDir'),
active: 'Yes',
inactive: 'No',
@ -440,7 +440,7 @@ async function run(): Promise<void> {
onState: onPromptState,
type: 'toggle',
name: 'customizeImportAlias',
message: `Would you like to customize the default ${styledImportAlias} (${defaults.importAlias})?`,
message: `Would you like to customize the ${styledImportAlias} (${defaults.importAlias} by default)?`,
initial: getPrefOrDefault('customizeImportAlias'),
active: 'Yes',
inactive: 'No',