mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-23 02:28:55 +00:00
Merge branch 'master' into development
- Pull request was accidentally merged into master
This commit is contained in:
parent
c362108c73
commit
f63f2e9e2b
@ -1,7 +1,7 @@
|
||||
import 'source-map-support/register';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import {app, ipcMain} from 'electron';
|
||||
import {app, ipcMain, crashReporter} from 'electron';
|
||||
import createLoginWindow from './components/login/loginWindow';
|
||||
import createMainWindow from './components/mainWindow/mainWindow';
|
||||
import helpers from './helpers/helpers';
|
||||
@ -62,6 +62,16 @@ app.on('before-quit', () => {
|
||||
}
|
||||
});
|
||||
|
||||
if (appArgs.crashReporter) {
|
||||
app.on('will-finish-launching', () => {
|
||||
crashReporter.start({
|
||||
productName: appArgs.name,
|
||||
submitURL: appArgs.crashReporter,
|
||||
autoSubmit: true
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
app.on('ready', () => {
|
||||
mainWindow = createMainWindow(appArgs, app.quit, setDockBadge);
|
||||
});
|
||||
|
15
docs/api.md
15
docs/api.md
@ -36,6 +36,7 @@
|
||||
- [[disable-context-menu]](#disable-context-menu)
|
||||
- [[disable-dev-tools]](#disable-dev-tools)
|
||||
- [[zoom]](#zoom)
|
||||
- [[crash-reporter]](#crash-reporter)
|
||||
- [Programmatic API](#programmatic-api)
|
||||
|
||||
## Command Line
|
||||
@ -328,6 +329,20 @@ Disable the context menu
|
||||
|
||||
Disable the Chrome developer tools
|
||||
|
||||
#### [crash-reporter]
|
||||
|
||||
```
|
||||
--crash-reporter <value>
|
||||
```
|
||||
|
||||
Enables crash reporting and set the URL to submit crash reports to
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
$ nativefier http://google.com --crash-reporter https://electron-crash-reporter.appspot.com/PROJECT_ID/create/
|
||||
```
|
||||
|
||||
#### [zoom]
|
||||
|
||||
```
|
||||
|
@ -116,7 +116,8 @@ function selectAppArgs(options) {
|
||||
disableContextMenu: options.disableContextMenu,
|
||||
disableDevTools: options.disableDevTools,
|
||||
zoom: options.zoom,
|
||||
internalUrls: options.internalUrls
|
||||
internalUrls: options.internalUrls,
|
||||
crashReporter: options.crashReporter
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -52,6 +52,7 @@ if (require.main === module) {
|
||||
.option('--disable-dev-tools', 'disable developer tools')
|
||||
.option('--zoom <value>', 'default zoom factor to use when the app is opened, defaults to 1.0', parseFloat)
|
||||
.option('--internal-urls <value>', 'regular expression of URLs to consider "internal"; all other URLs will be opened in an external browser. (default: URLs on same second-level domain as app)')
|
||||
.option('--crash-reporter <value>', 'remote server URL to send crash reports')
|
||||
.parse(process.argv);
|
||||
|
||||
if (!process.argv.slice(2).length) {
|
||||
|
@ -64,6 +64,7 @@ function optionsFactory(inpOptions, callback) {
|
||||
verbose: inpOptions.verbose,
|
||||
disableContextMenu: inpOptions.disableContextMenu,
|
||||
disableDevTools: inpOptions.disableDevTools,
|
||||
crashReporter: inpOptions.crashReporter,
|
||||
// workaround for electron-packager#375
|
||||
tmpdir: false,
|
||||
zoom: inpOptions.zoom || 1.0,
|
||||
|
Loading…
Reference in New Issue
Block a user