Closed LorenzKahl closed 8 months ago
In my custom CEM plugin I would like to generate a different output for prod / dev environments.
I tried calling the analyzer providing a custom argument environment:
environment
cem analyze --litelement --environment="production"
But it fails with the following error: > Uncaught UNKNOWN_OPTION: Unknown option: --environment
> Uncaught UNKNOWN_OPTION: Unknown option: --environment
Is there a better way to achieve this that I am missing?
You can use process.env for this, e.g.:
process.env
FOO=BAR cem analyze
And then in your plugin you can do:
if(process.env.FOO === 'bar') {}
In my custom CEM plugin I would like to generate a different output for prod / dev environments.
I tried calling the analyzer providing a custom argument
environment
:But it fails with the following error:
> Uncaught UNKNOWN_OPTION: Unknown option: --environment
Is there a better way to achieve this that I am missing?