Open gaoxiaoliangz opened 1 year ago
@dsherret is this supposed to work?
No, brace expansion has not been implemented in deno task.
This is something I'd be interested in taking a crack at. Looking at the GNU docs @dsherret shared, there are a few discrete features of brace expansion we might consider implementing.
"deno check services/*/{prod,dev}.ts"
"deno check services/{service1/{prod,staging,dev},service2/{prod,dev}}.ts"
"deno check services/service{0..10[..2]}/{prod,dev}.ts"
"deno check services/service{a..z}/{prod,dev}.ts"
Should I aim to tackle all four at once? Or should we start perhaps with just the first 1 or 2 and go from there?
Having looked a bit further into this, I think this would necessitate changes to the deno_task_shell
. @dsherret should we transfer this issue there?
So at the very least, this would require modifying the parser such that curly braces are allowed when applying word parts combinators.
However, the major issue is that the glob
module does not support string alternative syntax. A couple potential solutions to this:
@dsherret between these approaches, what do you think?
I have this in my deno.json
When I run
deno task check
, I got:My deno version: