diff options
Diffstat (limited to 'packages/create-astro/src/actions/context.ts')
-rw-r--r-- | packages/create-astro/src/actions/context.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/create-astro/src/actions/context.ts b/packages/create-astro/src/actions/context.ts index 83a13eda7..59f85f88a 100644 --- a/packages/create-astro/src/actions/context.ts +++ b/packages/create-astro/src/actions/context.ts @@ -15,6 +15,7 @@ export interface Context { version: Promise<string>; skipHouston: boolean; fancy?: boolean; + add?: string[]; dryRun?: boolean; yes?: boolean; projectName?: string; @@ -43,11 +44,11 @@ export async function getContext(argv: string[]): Promise<Context> { '--no-install': Boolean, '--git': Boolean, '--no-git': Boolean, - '--typescript': String, '--skip-houston': Boolean, '--dry-run': Boolean, '--help': Boolean, '--fancy': Boolean, + '--add': [String], '-y': '--yes', '-n': '--no', @@ -67,11 +68,11 @@ export async function getContext(argv: string[]): Promise<Context> { '--no-install': noInstall, '--git': git, '--no-git': noGit, - '--typescript': typescript, '--fancy': fancy, '--skip-houston': skipHouston, '--dry-run': dryRun, '--ref': ref, + '--add': add, } = flags; let projectName = cwd; @@ -79,12 +80,11 @@ export async function getContext(argv: string[]): Promise<Context> { yes = false; if (install == undefined) install = false; if (git == undefined) git = false; - if (typescript == undefined) typescript = 'strict'; } skipHouston = ((os.platform() === 'win32' && !fancy) || skipHouston) ?? - [yes, no, install, git, typescript].some((v) => v !== undefined); + [yes, no, install, git].some((v) => v !== undefined); const { messages, hats, ties } = getSeasonalData({ fancy }); @@ -96,6 +96,7 @@ export async function getContext(argv: string[]): Promise<Context> { version: getVersion(packageManager, 'astro', process.env.ASTRO_VERSION), skipHouston, fancy, + add, dryRun, projectName, template, @@ -106,7 +107,6 @@ export async function getContext(argv: string[]): Promise<Context> { yes, install: install ?? (noInstall ? false : undefined), git: git ?? (noGit ? false : undefined), - typescript, cwd, exit(code) { process.exit(code); |