Skip to content

Commit

Permalink
ux(cli): do not automatically open the browser
Browse files Browse the repository at this point in the history
There are a number of use cases where this behaviour isn't desirable. This is consistent with Vite behaviour, which has an --open flag.
  • Loading branch information
fwouts committed Apr 28, 2023
1 parent ffc06e1 commit 849fa88
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions integrations/cli/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { load } from "@previewjs/loader";
import chalk from "chalk";
import { program } from "commander";
import { readFileSync } from "fs";
import open from "open";
import url from "url";

const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
Expand Down Expand Up @@ -47,7 +46,6 @@ program

const port = parseInt(options.port);
await workspace!.preview.start(async () => port);
await open(`http://localhost:${port}`);
});

program.parseAsync(process.argv).catch((e) => {
Expand Down

0 comments on commit 849fa88

Please sign in to comment.