From 71571af618991138e7be8b85a4ac48074a6e55ae Mon Sep 17 00:00:00 2001 From: Tyler Peterson Date: Wed, 11 Dec 2019 14:37:33 -0500 Subject: [PATCH 1/3] Add option to show electron window --- bin/bin.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/bin.js b/bin/bin.js index 98ebf20..60313a1 100755 --- a/bin/bin.js +++ b/bin/bin.js @@ -32,6 +32,9 @@ var argv = optimist .describe('node', 'Enable nodejs apis in electron') .alias('n', 'node') + .describe('show', 'Show browser window if browser is electron') + .alias('w', 'show') + .describe('basedir', 'Set this if you need to require node modules in node mode') .describe('help', 'Print help') From 1df6e56ee717ee64f1e3b07c0aa857a86f4a9828 Mon Sep 17 00:00:00 2001 From: Tyler Peterson Date: Wed, 11 Dec 2019 14:42:00 -0500 Subject: [PATCH 2/3] Update README.md with option --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d4a426e..fbcdd87 100644 --- a/README.md +++ b/README.md @@ -50,13 +50,14 @@ Usage: browser-run [OPTIONS] Options: --browser, -b Browser to use. Always available: electron. Available if installed: chrome, firefox, ie, phantom, safari [default: "electron"] - --port Starts listening on that port and waits for you to open a browser - --static Serve static assets from this directory - --mock Path to code to handle requests for mocking a dynamic back-end - --input Input type. Defaults to 'javascript', can be set to 'html'. - --node Enable nodejs apis in electron - --basedir Set this if you need to require node modules in node mode - --help Print help + --port Starts listening on that port and waits for you to open a browser + --static Serve static assets from this directory + --mock Path to code to handle requests for mocking a dynamic back-end + --input Input type. Defaults to 'javascript', can be set to 'html'. + --node Enable nodejs apis in electron + --show Show browser window if browser is electron + --basedir Set this if you need to require node modules in node mode + --help Print help ``` ## Custom html file @@ -98,6 +99,7 @@ Returns a duplex stream and starts a webserver. * `mock`: Path to code to handle requests for mocking a dynamic back-end * `input`: Input type. Defaults to `javascript`, can be set to `html`. * `node`: Enable nodejs integration in electron +* `show`: Show browser window if browser is electron * `basedir`: Set this if you need to require node modules in `node` mode If only an empty string is written to it, an error will be thrown as there is nothing to execute. From 82b87f42726b99cdf877e1b2e14c609efcddb52b Mon Sep 17 00:00:00 2001 From: Tyler Peterson Date: Wed, 11 Dec 2019 14:45:15 -0500 Subject: [PATCH 3/3] Minimize diff by keeping trailing whitespace --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index fbcdd87..543244f 100644 --- a/README.md +++ b/README.md @@ -50,14 +50,14 @@ Usage: browser-run [OPTIONS] Options: --browser, -b Browser to use. Always available: electron. Available if installed: chrome, firefox, ie, phantom, safari [default: "electron"] - --port Starts listening on that port and waits for you to open a browser - --static Serve static assets from this directory - --mock Path to code to handle requests for mocking a dynamic back-end - --input Input type. Defaults to 'javascript', can be set to 'html'. - --node Enable nodejs apis in electron - --show Show browser window if browser is electron - --basedir Set this if you need to require node modules in node mode - --help Print help + --port Starts listening on that port and waits for you to open a browser + --static Serve static assets from this directory + --mock Path to code to handle requests for mocking a dynamic back-end + --input Input type. Defaults to 'javascript', can be set to 'html'. + --node Enable nodejs apis in electron + --show Show browser window if browser is electron + --basedir Set this if you need to require node modules in node mode + --help Print help ``` ## Custom html file