public icon indicating copy to clipboard operation
public copied to clipboard

Allow setting environment variables in WebStorm/IntelliJ Run Configurations

Open vjpr opened this issue 5 years ago • 0 comments

Issue description

I am working in a monorepo and I would like to be able to run Wallaby on a subset of the packages in the monorepo (usually a package and all its dependencies).

There are 20+ packages that I would like to be able to run Wallaby on. At present, this would need 20 separate wallaby config files in the root. wallaby.js must be in the root because it needs to include workspace dependencies.

If you could set environment variables in the run configuration dialog, I could easily use this to modify the wallaby.js#files.

The current workaround I use is to have a .env file read and for wallaby to pick up the value from that.

Another workaround is to use a Before launch action to run an npm script that calls echo "WALLABY_DIR=$@" > tmp/wallaby.env and then read then read from tmp/wallaby.env inside the wallaby.js, and make sure to check the Allow parallel run checkbox. Much too complicated though.

vjpr avatar Jun 15 '20 21:06 vjpr