Skip to content

Commit ba26284

Browse files
committed
add sandbox option
1 parent fc691a2 commit ba26284

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,18 @@ Write code to stdin and receive console output on stdout.
4949
Usage: browser-run [OPTIONS]
5050

5151
Options:
52-
--browser, -b Browser to use. Always available: electron. Available if installed: chrome, firefox, ie, safari [default: "electron"]
53-
--port Starts listening on that port and waits for you to open a browser
54-
--static Serve static assets from this directory
55-
--mock Path to code to handle requests for mocking a dynamic back-end
56-
--input Input type. Defaults to 'javascript', can be set to 'html'.
57-
--node Enable nodejs apis in electron
58-
--basedir Set this if you need to require node modules in node mode
59-
--help Print help
52+
--version Show version number [boolean]
53+
-b, --browser Browser to use. Always available: electron. Available if
54+
installed: chrome, firefox, ie, safari [default: "electron"]
55+
--sandbox Enable electron sandbox [boolean] [default: true]
56+
--basedir Set this if you need to require node modules in node mode
57+
-h, --help Print help [boolean]
58+
-p, --port Starts listening on that port and waits for you to open a
59+
browser
60+
-s, --static Serve static assets from this directory
61+
-m, --mock Path to code to handle requests for mocking a dynamic back-end
62+
-i, --input Input type. Defaults to 'javascript', can be set to 'html'.
63+
-n, --node Enable nodejs apis in electron
6064
```
6165
6266
## Custom html file
@@ -97,6 +101,7 @@ Returns a duplex stream and starts a webserver.
97101
* `mock`: Path to code to handle requests for mocking a dynamic back-end
98102
* `input`: Input type. Defaults to `javascript`, can be set to `html`.
99103
* `node`: Enable nodejs integration in electron
104+
* `sandbox`: Enable electron sandbox. Default: `true`.
100105
* `basedir`: Set this if you need to require node modules in `node` mode
101106
102107
If only an empty string is written to it, an error will be thrown as there is nothing to execute.

bin/bin.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ var argv = yargs(process.argv.slice(2))
3232
.describe('node', 'Enable nodejs apis in electron')
3333
.alias('n', 'node')
3434

35+
.describe('sandbox', 'Enable electron sandbox')
36+
.boolean('sandbox')
37+
.default('sandbox', true)
38+
3539
.describe('basedir', 'Set this if you need to require node modules in node mode')
3640

3741
.help('h')

0 commit comments

Comments
 (0)