Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move create-astro async tasks to end #9470

Merged
merged 8 commits into from
Jan 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add tasks to context
onsclom committed Dec 19, 2023
commit 0e64cd7c400c4deeec86948cf5a8020943692aa8
4 changes: 3 additions & 1 deletion packages/create-astro/src/actions/context.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { prompt } from '@astrojs/cli-kit';
import { prompt, type Task } from '@astrojs/cli-kit';
import { random } from '@astrojs/cli-kit/utils';
import arg from 'arg';
import os from 'node:os';
@@ -26,6 +26,7 @@ export interface Context {
stdout?: typeof process.stdout;
exit(code: number): never;
hat?: string;
tasks: Task[];
}

export async function getContext(argv: string[]): Promise<Context> {
@@ -103,6 +104,7 @@ export async function getContext(argv: string[]): Promise<Context> {
exit(code) {
process.exit(code);
},
tasks: [],
};
return context;
}