feat: add no-browser option

- Introduce `no-browser` CLI option to disable browser auto-open on server start
- Update logic to respect the `no-browser` flag

Signed-off-by: Minecon724 <git@m724.eu>
This commit is contained in:
Minecon724 2025-02-07 12:57:26 +01:00
parent a78bec5c5e
commit c16350ecee
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8

View file

@ -26,6 +26,7 @@ public class Main {
.addOption("t", "template-dir", true, "Template directory. Default: working directory/template")
.addOption("o", "output-dir", true, "Output directory. Default: working directory/generated_out")
.addOption("s", "server", false, "Run webserver. Default: no")
.addOption("no-browser", false, "Do NOT open browser on server start")
.addOption("d", "draft", false, "Render drafts. Default: only with server");
CommandLine commandLine;
@ -55,7 +56,7 @@ public class Main {
var force = commandLine.hasOption("force");
var server = commandLine.hasOption("server");
var openBrowser = true;
var openBrowser = !commandLine.hasOption("no-browser");
var renderDrafts = commandLine.hasOption("draft") || server;
//