-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Suppose I have npm scripts like this:
"some:process": "...",
"some:process:variant1: "npm run some:process -- --someArg variant1",
"some:process:variant2: "npm run some:process -- --someArg variant2",
"some:process:variant3: "npm run some:process -- --someArg variant3",
"some:process:variant4: "npm run some:process -- --someArg variant4",
"some:process:variant1:a": "npm run some:process -- --someArg variant1 --someArg2 a",
"some:process:variant2:b": "npm run some:process -- --someArg variant2 --someArg2 b",
"some:process:variant3:c": "npm run some:process -- --someArg variant3 --someArg2 c",
"some:process:variant4:d": "npm run some:process -- --someArg variant4 --someArg2 d",
(Note I'm not yet using nabs -- the above use of ':' in above example comes from an existing convention I'm using in my project -- some:process is not a parent of each variant in the nabs sense but rather a generic version of a process that can be run in different ways -- i should probably not have used ':' in my example -- imagine some other delimiter instead)
Can nabs help with (or grow features to help with) managing really regular run-script patterns like this?
My real project has a list of run-script entries like: some:process(1..N):variant(1..K):variant(1..J). I use this pattern to represent the different processes that can be run and the different arguments each process can meaningfully be run with. The goal of this pattern is to statically enumerate the different meaningful process execution scenarios and avoid passing arguments to npm run via -- this works well with tools like vscode that provide functionality to invoke package.json scripts and simplifies/controls the interface between the run scripts and external automation agents like jenkins or other CI.
It would be nice to figure out a way to not have to manage K*J nearly identical run-script entries for each N ... Could something be added to nabs to support this?