Skip to content

Commit

Permalink
sync naming for app value for future destructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
devjiwonchoi committed Aug 2, 2024
1 parent e0aa377 commit 6c3f08b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions packages/create-next-app/create-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function createApp({
typescript,
tailwind,
eslint,
appRouter,
app,
srcDir,
importAlias,
skipInstall,
Expand All @@ -45,7 +45,7 @@ export async function createApp({
typescript: boolean
tailwind: boolean
eslint: boolean
appRouter: boolean
app: boolean
srcDir: boolean
importAlias: string
skipInstall: boolean
Expand All @@ -54,7 +54,7 @@ export async function createApp({
}): Promise<void> {
let repoInfo: RepoInfo | undefined
const mode: TemplateMode = typescript ? 'ts' : 'js'
const template: TemplateType = `${appRouter ? 'app' : 'default'}${tailwind ? '-tw' : ''}${empty ? '-empty' : ''}`
const template: TemplateType = `${app ? 'app' : 'default'}${tailwind ? '-tw' : ''}${empty ? '-empty' : ''}`

if (example) {
let repoUrl: URL | undefined
Expand Down
12 changes: 6 additions & 6 deletions packages/create-next-app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,17 +335,17 @@ async function run(): Promise<void> {
opts.app = getPrefOrDefault('app')
} else {
const styledAppDir = blue('App Router')
const { appRouter } = await prompts({
const { app } = await prompts({
onState: onPromptState,
type: 'toggle',
name: 'appRouter',
name: 'app',
message: `Would you like to use ${styledAppDir}? (recommended)`,
initial: getPrefOrDefault('app'),
active: 'Yes',
inactive: 'No',
})
opts.app = Boolean(appRouter)
preferences.app = Boolean(appRouter)
opts.app = Boolean(app)
preferences.app = Boolean(app)
}
}

Expand Down Expand Up @@ -422,7 +422,7 @@ async function run(): Promise<void> {
typescript: opts.typescript,
tailwind: opts.tailwind,
eslint: opts.eslint,
appRouter: opts.app,
app: opts.app,
srcDir: opts.srcDir,
importAlias: opts.importAlias,
skipInstall: opts.skipInstall,
Expand Down Expand Up @@ -453,7 +453,7 @@ async function run(): Promise<void> {
typescript: opts.typescript,
eslint: opts.eslint,
tailwind: opts.tailwind,
appRouter: opts.app,
app: opts.app,
srcDir: opts.srcDir,
importAlias: opts.importAlias,
skipInstall: opts.skipInstall,
Expand Down

0 comments on commit 6c3f08b

Please sign in to comment.