-
Notifications
You must be signed in to change notification settings - Fork 370
Description
What is the current behavior?
There is a set of global options (these ones) which can be set on any (?) specific command as an arg.
For example:
web-ext run --source-dir distweb-ext lint --ignoreFiles 'dist/**'
This is very useful if you have a compilation step before the extension can be built, so you cannot set source or ignore globally for every command.
However, while they work as arguments, you cannot configure them in the webExt block of package.json.
The following code does not work:
{
"webExt": {
"run": {
"sourceDir": "dist"
},
"lint": {
"ignoreFiles": [
"dist/**"
]
}
}
}When running a command the error is:
UsageError: The config file at /REDACTED/package.json specified an unknown option: "sourceDir"
or
UsageError: The config file at /REDACTED/package.json specified an unknown option: "ignoreFiles"
What is the expected or desired behavior?
It would be useful to be able to set these global options on specific commands, rather than only being able to set them for the entire project.
The current workaround is to spread config between the webExt block and aliasing commands with the correct args as scripts which works but can make debugging tricky as config is now being set in multiple places.