npm-run-all icon indicating copy to clipboard operation
npm-run-all copied to clipboard

Custom labels

Open astorije opened this issue 7 years ago • 2 comments

We would like to use the --print-labels option, but when giving npm-run-all extra arguments (for example npm-run-all --print-labels \"build -- --watch\" [...]), this prints very long labels that add clutter to the output.

With concurrently, we manage this with --names, but that forces us to use both npm-run-all and concurrently, while I would much rather only using npm-run-all.

It would be great if we could either:

  • Specify a custom label. Not sure what would be the best syntax for it, but I can think of 2 at least:

    • concurrently-like, so in the example above, that would be:
      npm-run-all --print-labels --labels=build,[...] \"build -- --watch\" [...]
      
    • Some way to prefix commands:
      npm-run-all --print-labels build:\"build -- --watch\" [...]
      
  • Or if there was a way to strip extra arguments from the command given (in the example above, that would just be build) but that could be problematic with commands like npm-run-all --print-labels \"build -- --arg1\" \"build -- --arg2\" [...] (though a bit of a niche use case)

astorije avatar Jan 07 '18 19:01 astorije

Thank you for this issue. Apology for the slow response.

The concurrently-like option seems nicer. Because npm-run-all allows glob-like patterns to specify task names (e.g. build:\"build:* -- --watch\"), the label can apply to multiple tasks.

mysticatea avatar Jan 15 '18 13:01 mysticatea

Having shorter labels would be really nice. Any progress on this?

jonaskello avatar Oct 07 '18 16:10 jonaskello