Skip to content

Commit f768724

Browse files
sean-perkinsgithub-actions[bot]
authored andcommitted
chore: prettier formatting
1 parent bd50b8b commit f768724

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

packages/cli/src/index.ts

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
spinner,
1111
} from "@clack/prompts";
1212
import color from "picocolors";
13-
import { TERMINAL_INFO } from '@ionic/utils-terminal';
13+
import { TERMINAL_INFO } from "@ionic/utils-terminal";
1414
import { Project } from "ts-morph";
1515
import { existsSync } from "node:fs";
1616

@@ -21,8 +21,7 @@ const IONIC_MIGRATION_GUIDE_URL =
2121
"https://www.ionicframework.com/docs/angular/build-options#migrating-from-modules-to-standalone";
2222
const IONIC_REPOSITORY_ISSUES_URL =
2323
"https://github.com/ionic-team/ionic-angular-standalone-codemods/issues";
24-
const isInteractive = (): boolean =>
25-
TERMINAL_INFO.tty && !TERMINAL_INFO.ci;
24+
const isInteractive = (): boolean => TERMINAL_INFO.tty && !TERMINAL_INFO.ci;
2625

2726
async function main() {
2827
console.clear();
@@ -43,23 +42,26 @@ async function main() {
4342
);
4443
log.warning("--------------------------------------------------");
4544

46-
const cli = isInteractive() ? await group({
47-
dryRun: () =>
48-
confirm({
49-
message:
50-
"Would you like to run this migration as a dry run? No changes will be written to your project.",
51-
initialValue: true,
52-
}),
53-
dir: () =>
54-
text({
55-
message:
56-
"Please enter the path to your project (default is the current working directory):",
57-
initialValue: cwd(),
58-
}),
59-
}) : {
60-
// If we are in a non-interactive terminal then use defaults
61-
dryRun: false, dir: cwd()
62-
};
45+
const cli = isInteractive()
46+
? await group({
47+
dryRun: () =>
48+
confirm({
49+
message:
50+
"Would you like to run this migration as a dry run? No changes will be written to your project.",
51+
initialValue: true,
52+
}),
53+
dir: () =>
54+
text({
55+
message:
56+
"Please enter the path to your project (default is the current working directory):",
57+
initialValue: cwd(),
58+
}),
59+
})
60+
: {
61+
// If we are in a non-interactive terminal then use defaults
62+
dryRun: false,
63+
dir: cwd(),
64+
};
6365

6466
if (typeof cli.dryRun !== "boolean") {
6567
// User aborted the prompt

0 commit comments

Comments
 (0)