mirror of
https://github.com/electron/electron.git
synced 2026-01-25 23:38:18 -05:00
add --app parameter and update the example usage in the default_app #1877
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
<body>
|
||||
<script>
|
||||
var execPath = require('remote').process.execPath;
|
||||
var command = execPath + ' path-to-your-app';
|
||||
var command = execPath + '--app=path-to-your-app';
|
||||
|
||||
document.onclick = function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -18,6 +18,9 @@ for (var i = 0; i < argv.length; i++) {
|
||||
if (argv[i] == '--version' || argv[i] == '-v') {
|
||||
option.version = true;
|
||||
break;
|
||||
} else if (argv[i].match(/^--app=/)) {
|
||||
option.file = argv[i].split('=')[1];
|
||||
break;
|
||||
} else if (argv[i] == '--help' || argv[i] == '-h') {
|
||||
option.help = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user