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:
parent
a78bec5c5e
commit
c16350ecee
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue