neutralinojs / neutralinojs-cli

neu cli for Neutralinojs
https://neutralino.js.org/docs/cli/neu-cli
MIT License
91 stars 56 forks source link

feat: Add "cli.frontendLibrary.dontStartBrowser" configuration variable. #243

Closed jschyra closed 5 months ago

jschyra commented 5 months ago

This feature adds a configuration variable that can be used to pass the BROWSER=none environment variable to the devCommand directly from the code. The prefix can thus be shortened from the command. This supports the cross-platform compatibility of a project without the need to use external libraries such as cross-env. As the process environment for the devCommand is copied and then modified, global variables are still permitted and the current environment of the process is not affected. The feature is also backwards compatible, as a process does not mind that the same variable is set twice.

The behavior of the variable is:

viralgupta commented 5 months ago

Hi @jschyra, BROWSER=none is only react specific and does not work in other frameworks like vue or vanilajs, passing the env variable to all the frameworks may cause the command to fail. I have already created a PR in neutralinojs-react starter template to fix this (#8)

jschyra commented 5 months ago

Hi @viralgupta, thank you for the clarification! I hadn't really considered that. I will close the pull request.

Thanks also for opening the PR on the template project!