mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-23 02:28:55 +00:00
Add support for --disk-cache-size Electron flag (PR #400)
This commit is contained in:
parent
f41c376761
commit
ab435ee5a6
@ -29,6 +29,10 @@ if (appArgs.ignoreCertificate) {
|
|||||||
app.commandLine.appendSwitch('ignore-certificate-errors');
|
app.commandLine.appendSwitch('ignore-certificate-errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (appArgs.diskCacheSize) {
|
||||||
|
app.commandLine.appendSwitch('disk-cache-size', appArgs.diskCacheSize);
|
||||||
|
}
|
||||||
|
|
||||||
// do nothing for setDockBadge if not OSX
|
// do nothing for setDockBadge if not OSX
|
||||||
let setDockBadge = () => {};
|
let setDockBadge = () => {};
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
- [[insecure]](#insecure)
|
- [[insecure]](#insecure)
|
||||||
- [[flash]](#flash)
|
- [[flash]](#flash)
|
||||||
- [[flash-path]](#flash-path)
|
- [[flash-path]](#flash-path)
|
||||||
|
- [[disk-cache-size]](#disk-cache-size)
|
||||||
- [[inject]](#inject)
|
- [[inject]](#inject)
|
||||||
- [[full-screen]](#full-screen)
|
- [[full-screen]](#full-screen)
|
||||||
- [[maximize]](#maximize)
|
- [[maximize]](#maximize)
|
||||||
@ -266,6 +267,13 @@ Take note that if this flag is specified, the `--insecure` flag will be added au
|
|||||||
|
|
||||||
You can also specify the path to the Chrome flash plugin directly with this flag. The path can be found at [chrome://plugins](chrome://plugins), under `Adobe Flash Player` > `Location`. This flag automatically enables the `--flash` flag as well.
|
You can also specify the path to the Chrome flash plugin directly with this flag. The path can be found at [chrome://plugins](chrome://plugins), under `Adobe Flash Player` > `Location`. This flag automatically enables the `--flash` flag as well.
|
||||||
|
|
||||||
|
#### [disk-cache-size]
|
||||||
|
|
||||||
|
```
|
||||||
|
--disk-cache-size <value>
|
||||||
|
```
|
||||||
|
Forces the maximum disk space to be used by the disk cache. Value is given in bytes.
|
||||||
|
|
||||||
#### [inject]
|
#### [inject]
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -28,6 +28,7 @@ function selectAppArgs(options) {
|
|||||||
ignoreCertificate: options.ignoreCertificate,
|
ignoreCertificate: options.ignoreCertificate,
|
||||||
insecure: options.insecure,
|
insecure: options.insecure,
|
||||||
flashPluginDir: options.flashPluginDir,
|
flashPluginDir: options.flashPluginDir,
|
||||||
|
diskCacheSize: options.diskCacheSize,
|
||||||
fullScreen: options.fullScreen,
|
fullScreen: options.fullScreen,
|
||||||
hideWindowFrame: options.hideWindowFrame,
|
hideWindowFrame: options.hideWindowFrame,
|
||||||
maximize: options.maximize,
|
maximize: options.maximize,
|
||||||
|
@ -41,6 +41,7 @@ if (require.main === module) {
|
|||||||
.option('--insecure', 'enable loading of insecure content, defaults to false')
|
.option('--insecure', 'enable loading of insecure content, defaults to false')
|
||||||
.option('--flash', 'if flash should be enabled')
|
.option('--flash', 'if flash should be enabled')
|
||||||
.option('--flash-path <value>', 'path to Chrome flash plugin, find it in `Chrome://plugins`')
|
.option('--flash-path <value>', 'path to Chrome flash plugin, find it in `Chrome://plugins`')
|
||||||
|
.option('--disk-cache-size <value>', 'forces the maximum disk space (in bytes) to be used by the disk cache')
|
||||||
.option('--inject <value>', 'path to a CSS/JS file to be injected', collect, [])
|
.option('--inject <value>', 'path to a CSS/JS file to be injected', collect, [])
|
||||||
.option('--full-screen', 'if the app should always be started in full screen')
|
.option('--full-screen', 'if the app should always be started in full screen')
|
||||||
.option('--maximize', 'if the app should always be started maximized')
|
.option('--maximize', 'if the app should always be started maximized')
|
||||||
|
@ -44,6 +44,7 @@ export default function (inpOptions) {
|
|||||||
ignoreCertificate: inpOptions.ignoreCertificate || false,
|
ignoreCertificate: inpOptions.ignoreCertificate || false,
|
||||||
insecure: inpOptions.insecure || false,
|
insecure: inpOptions.insecure || false,
|
||||||
flashPluginDir: inpOptions.flashPath || inpOptions.flash || null,
|
flashPluginDir: inpOptions.flashPath || inpOptions.flash || null,
|
||||||
|
diskCacheSize: inpOptions.diskCacheSize || null,
|
||||||
inject: inpOptions.inject || null,
|
inject: inpOptions.inject || null,
|
||||||
ignore: 'src',
|
ignore: 'src',
|
||||||
fullScreen: inpOptions.fullScreen || false,
|
fullScreen: inpOptions.fullScreen || false,
|
||||||
|
Loading…
Reference in New Issue
Block a user