Skip to content

Commit f9c7658

Browse files
committed
feat: mention detected framework when presenting build settings
1 parent e4889b3 commit f9c7658

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/utils/init/utils.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,14 @@ export const getBuildSettings = async ({
113113
log()
114114
}
115115

116+
const frameworkName = setting.framework?.name
117+
if (frameworkName) {
118+
log()
119+
log(`We detected that you're using ${formatTitle(frameworkName)}. Below are recommended build settings.`)
120+
log('For each setting, press Enter to accept the default or provide your own value.')
121+
log()
122+
}
123+
116124
const { baseDir, buildCmd, buildDir } = await inquirer.prompt<{
117125
baseDir?: string | undefined
118126
buildCmd: string

tests/integration/commands/init/init.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,9 @@ describe.concurrent('commands/init', () => {
392392

393393
handleQuestions(childProcess, initQuestions)
394394

395-
await childProcess
395+
const { stdout } = await childProcess
396+
397+
t.expect(stdout).toContain("We detected that you're using Next.js. Below are recommended build settings.")
396398

397399
await assertNetlifyToml(t, builder.directory, { command, functions: defaultFunctionsDirectory, publish })
398400
})

0 commit comments

Comments
 (0)