npm-run-all
npm-run-all copied to clipboard
feature request: --waterfall
how about adding a --waterfall command line option?
Could you explain what is it?
Runs the tasks in series, each passing their results to the next as in https://github.com/caolan/async#waterfall
Thank you.
Hmm, what is the result of CLI tool?
It sounds like pipe: npm run a | npm run b | npm run c
But I'm not sure it's possible.
Yes it is a pipe. The same way we try to avoid doing task1 && task2 && task 3 it might be beneficial to pipe the result of one task into another. The output of the last task would be the output of the CLI. E.g. get-json-async | jq 'json selector' | write-to-file
OK, I will challenge to add --waterfall option.
I'm sorry, I'm busy now. I will do this by early next month, but if someone can make a PR, please don't wait for me.
I do not work on osx or win very much but both supports pipe (powershell and git bash...). Would these be equivalent?
npm-run-all -w \"get-json-async\" \"jq 'json selector'\" \"write-to-file\"
and
npm-run-all get-json-async | jq 'json selector' | write-to-file
I do not see the purpose npm-run-all has (lack of imagination?) unless we can do globs parallel:
npm-run-all -p -w \"get-json-async\" \"jq 'json selector'\" \"write-to-file\"
in which case wouldn't interpreting the pipe be more intuitive than the flag?
npm-run-all -p get-json-async:* | jq 'json selector' | write-to-file
This has not implemented yet :sweat_smile: I have not gotten enough time for this issue for long time...
npm-run-all -w \"get-json-async\" \"jq 'json selector'\" \"write-to-file\"andnpm-run-all get-json-async | jq 'json selector' | write-to-file
Yes, it's the plan.
npm-run-all executes npm-scripts from right to left in --waterfall, then connects those by pipe.