diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-03-31 17:36:19 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-05-16 00:54:58 +0200 |
commit | 69da3ea797fc933244feadd625d9703f6aaf2085 (patch) | |
tree | 8192b31d85749a0760ebb31874d569508a220aac | |
parent | chore(deps): Bump electron to 18 (diff) | |
download | sophie-69da3ea797fc933244feadd625d9703f6aaf2085.tar.gz sophie-69da3ea797fc933244feadd625d9703f6aaf2085.tar.zst sophie-69da3ea797fc933244feadd625d9703f6aaf2085.zip |
build: Allow command line arguments to watch
Signed-off-by: Kristóf Marussy <kristof@marussy.com>
-rw-r--r-- | scripts/watch.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/watch.js b/scripts/watch.js index 7c9a4fe..9fa6a57 100644 --- a/scripts/watch.js +++ b/scripts/watch.js | |||
@@ -182,9 +182,13 @@ function setupMainPackageWatcher(viteDevServer) { | |||
182 | spawnProcess = undefined; | 182 | spawnProcess = undefined; |
183 | } | 183 | } |
184 | 184 | ||
185 | spawnProcess = spawn(String(electronPath), ['.'], { | 185 | spawnProcess = spawn( |
186 | stdio: ['inherit', 'inherit', 'pipe'], | 186 | String(electronPath), |
187 | }); | 187 | ['.', ...process.argv.splice(2)], |
188 | { | ||
189 | stdio: ['inherit', 'inherit', 'pipe'], | ||
190 | }, | ||
191 | ); | ||
188 | 192 | ||
189 | spawnProcess.stderr.on('data', (/** @type {Buffer} */ data) => { | 193 | spawnProcess.stderr.on('data', (/** @type {Buffer} */ data) => { |
190 | const stderrString = data.toString('utf8').trimEnd(); | 194 | const stderrString = data.toString('utf8').trimEnd(); |