Closed bgever closed 3 years ago
@karolis-sh Hope you find this feature useful. 😊 I'm using it locally to work with my app's CLI in dev mode.
Thanks for the solid contribution! 👍
Thanks for accepting the PR and quick release. 🎉 And thanks for adding the example to the playground.
Adds support for the
-- <args...>
option on thedev
command, and passes the remainder of the arguments (similar tonpm start
) to the underlying electron CLI executable.This allows for passing arguments to the
main.js
in case the app supports processing CLI arguments.electron-snowpack dev --verbose -- --myarg example -e=example --example2 'example 2'
electron-snowpack dev
as thestart
script inpackage.json
):npm start -- --verbose -- --myarg example -e=example --example2 'example 2'
The commander implementation automatically removes consumed arguments from the
program.args
array (like the--verbose
in the previous example, and adds any "unconsumed" arguments after--
to the args property. The command name needs to be explicitly removed.