Closed Anahkiasen closed 7 years ago
Thanks @Anahkiasen for reporting this issue. The script parameter is indeed handled as one argument. Possible solutions would be:
is_custom
or is_run_task
parameter which will add the run before the script
parameter in the CLI.arguments
parameter in which you can specify custom cli arguments.Can you tell me which you like best?
Could Grumphp recognize if the custom script starts with "run "
? It's always either going to or not going to anyway no?
That is also a possibility. However, I prefer to keep the configuration explicit. This way, the parameters can't be abused and won't contain any unpredictable logic. Maybe the boolean option is the best choice. As stated in the NPM docs, it is also possible to add custom attributes to a custom command. We could use an arguments parameter for that case.
This issue is fixed in #251. Can you check if this is working for you?
My configuration
Steps to reproduce:
Run Grumphp
Result:
In NPM, you can add custom scripts to the
package.json
file. Custom being any scripts that are not core scripts (npm build, npm test, etc). To run those, you callnpm run {name of script}
.Issue is currently Grumphp runs
npm 'run lint'
instead ofnpm run lint
, which fails.