Skip to content

Commit

Permalink
fix: ci defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
styfle committed Aug 7, 2023
1 parent 3db5c16 commit 993fb10
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/create-next-app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,9 @@ async function run(): Promise<void> {

if (!program.typescript && !program.javascript) {
if (ciInfo.isCI) {
// default to JavaScript in CI as we can't prompt to
// default to TypeScript in CI as we can't prompt to
// prevent breaking setup flows
program.typescript = false
program.javascript = true
program.typescript = getPrefOrDefault('typescript')
} else {
const styledTypeScript = blue('TypeScript')
const { typescript } = await prompts(
Expand Down Expand Up @@ -295,7 +294,7 @@ async function run(): Promise<void> {
!process.argv.includes('--no-eslint')
) {
if (ciInfo.isCI) {
program.eslint = true
program.eslint = getPrefOrDefault('eslint')
} else {
const styledEslint = blue('ESLint')
const { eslint } = await prompts({
Expand All @@ -317,7 +316,7 @@ async function run(): Promise<void> {
!process.argv.includes('--no-tailwind')
) {
if (ciInfo.isCI) {
program.tailwind = false
program.tailwind = getPrefOrDefault('tailwind')
} else {
const tw = blue('Tailwind CSS')
const { tailwind } = await prompts({
Expand All @@ -339,7 +338,7 @@ async function run(): Promise<void> {
!process.argv.includes('--no-src-dir')
) {
if (ciInfo.isCI) {
program.srcDir = false
program.srcDir = getPrefOrDefault('srcDir')
} else {
const styledSrcDir = blue('`src/` directory')
const { srcDir } = await prompts({
Expand Down

0 comments on commit 993fb10

Please sign in to comment.