joshwcomeau / guppy

🐠A friendly application manager and task runner for React.js
ISC License
3.27k stars 154 forks source link

Batch start multiple tasks #327

Open AWolf81 opened 5 years ago

AWolf81 commented 5 years ago

It would be great if there would be a button to start multiple tasks at once e.g. start test in watch mode & start dev server. I'm not sure if this is what beginners are needing but I think it's good to have the tests and the devServer running with a single click.

This is a large task as there are many thing required so it makes sense to have a batch start:

  1. Change test to interactive mode so it watches the test and the user can re-run tests with buttons - I'll create a separate issue for this. (see #328)
  2. A overview of currently running tasks. This is probably optional but it would be great to have it. I think something like an icon bar with lights about the current status of the task including indicating of test errors (if any). No separate issue as we can track/add this here.

Describe the solution you'd like

  1. Default button that will run or stop a set of tasks that are pre-defined by Guppy e.g. test, devServer (& maybe later linting, flow,... which we don't have right now - linting/flow could be added as addon/plugin)

  2. Configurable task button instead of the pre-defined that renders a second button

  3. If we're having addons/plugins for linting/flow... we could add a setting so the user can decide if the plugin should start with the default button click. (future idea - can't be added at the moment)

I think we can add the configurable task to the script to the package.json. I imagine something like guppy:launchDev. The first part is required as guppy so we can pick it and the second so we can map it to a user defined string if the user modified it in Guppy.

I would start with the default button and name it like Start with a tooltip to show what will be started. Not sure where the button should be. It could be in the overview to start & stop all tasks.

Todos for this issue

I think this is not a top priority feature. So we should focus on other issues first.

Discussion