Merge pull request #927 from kittizz/fix-cli-inject
Fix: TypeError when using --inject with comma-separated file paths
This commit is contained in:
7
bin/cli.ts
vendored
7
bin/cli.ts
vendored
@@ -39,7 +39,12 @@ program
|
||||
.option('--fullscreen', 'Start in full screen', DEFAULT.fullscreen)
|
||||
.option('--hide-title-bar', 'For Mac, hide title bar', DEFAULT.hideTitleBar)
|
||||
.option('--multi-arch', 'For Mac, both Intel and M1', DEFAULT.multiArch)
|
||||
.option('--inject <url...>', 'Injection of .js or .css files', DEFAULT.inject)
|
||||
.option(
|
||||
'--inject <./style.css,./script.js,...>',
|
||||
'Injection of .js or .css files',
|
||||
(val, previous) => (val ? val.split(',').map(item => item.trim()) : DEFAULT.inject),
|
||||
DEFAULT.inject,
|
||||
)
|
||||
.option('--debug', 'Debug build and more output', DEFAULT.debug)
|
||||
.addOption(new Option('--proxy-url <url>', 'Proxy URL for all network requests').default(DEFAULT_PAKE_OPTIONS.proxyUrl).hideHelp())
|
||||
.addOption(new Option('--user-agent <string>', 'Custom user agent').default(DEFAULT.userAgent).hideHelp())
|
||||
|
||||
1
dist/cli.js
vendored
1
dist/cli.js
vendored
@@ -778,7 +778,6 @@ const DEFAULT_PAKE_OPTIONS = {
|
||||
height: 780,
|
||||
width: 1200,
|
||||
fullscreen: false,
|
||||
resizable: true,
|
||||
hideTitleBar: false,
|
||||
alwaysOnTop: false,
|
||||
appVersion: '1.0.0',
|
||||
|
||||
Reference in New Issue
Block a user