Skip to content

Commit 5accef7

Browse files
committed
make it easier to copy paste commands.
1 parent 98a7699 commit 5accef7

2 files changed

Lines changed: 28 additions & 13 deletions

File tree

scripts/setup.ts

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -183,18 +183,30 @@ if (import.meta.main) {
183183
// TODO: prompt to initialize a fresh git repo?
184184
}
185185

186-
const notes: (string | false)[] = [
187-
updatedShell === "bash" && "source ~/.bashrc",
188-
updatedShell === "zsh" && "source ~/.zshrc",
189-
190-
`cd ${directory}`,
191-
"wql up",
192-
];
193-
note(
194-
notes.filter(part => part !== false).join(" && "),
195-
"Next steps (copy and paste this command):",
196-
);
197-
198186
outro(`You're good to go!`);
187+
188+
if (updatedShell) {
189+
console.log(
190+
color.bgBlue(
191+
"To start your project, first run this command to reload your shell configuration:",
192+
),
193+
);
194+
195+
console.log(
196+
[
197+
updatedShell === "bash" && "source ~/.bashrc",
198+
updatedShell === "zsh" && "source ~/.zshrc",
199+
]
200+
.filter(cmd => cmd !== false)
201+
.at(0),
202+
);
203+
console.log();
204+
console.log(color.bgBlue("Then, run:"));
205+
console.log(`cd ${directory} && wql up`);
206+
} else {
207+
console.log(color.bgBlue("To start your project, run:"));
208+
console.log(`cd ${directory} && wql up`);
209+
}
210+
199211
Deno.exit(0);
200212
}

scripts/wql.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ const DREAMLAB_ROOT = path.join(path.fromFileUrl(import.meta.url), "../..");
1111

1212
const cli = new Command()
1313
.name("wql")
14-
.command("up [path:string]", "Start the Dreamlab Engine in an environment")
14+
.command(
15+
"up [path:string]",
16+
"Start the Dreamlab Engine in a project directory. Defaults to cwd",
17+
)
1518
.action(async (_opts: any, dir = Deno.cwd()) => {
1619
intro(color.bgCyan(" wql up "));
1720

0 commit comments

Comments
 (0)