add --app parameter and update the example usage in the default_app #1877
This commit is contained in:
parent
5bdc077b48
commit
c7dc901607
2 changed files with 4 additions and 1 deletions
|
@ -58,7 +58,7 @@
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
var execPath = require('remote').process.execPath;
|
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) {
|
document.onclick = function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
|
@ -18,6 +18,9 @@ for (var i = 0; i < argv.length; i++) {
|
||||||
if (argv[i] == '--version' || argv[i] == '-v') {
|
if (argv[i] == '--version' || argv[i] == '-v') {
|
||||||
option.version = true;
|
option.version = true;
|
||||||
break;
|
break;
|
||||||
|
} else if (argv[i].match(/^--app=/)) {
|
||||||
|
option.file = argv[i].split('=')[1];
|
||||||
|
break;
|
||||||
} else if (argv[i] == '--help' || argv[i] == '-h') {
|
} else if (argv[i] == '--help' || argv[i] == '-h') {
|
||||||
option.help = true;
|
option.help = true;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue