Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel run with regex command #4581

Open
azat-io opened this issue Sep 8, 2023 · 4 comments
Open

Parallel run with regex command #4581

azat-io opened this issue Sep 8, 2023 · 4 comments
Labels
enhancement New feature or request npm Something that relates to the npm-compatible client

Comments

@azat-io
Copy link

azat-io commented Sep 8, 2023

What is the problem this feature would solve?

In pnpm you can run commands parallel using regex:

{
  "scripts": {
    "test:format": "prettier --check \"**/*.{js,ts,json,md,yml}\"",
    "test:js": "eslint \"**/*.{js,ts}\"",
    "test:types": "tsc --noEmit --pretty",
    "test": "pnpm run /^test:/"
  }
}

It would be cool to be able to run the test command to execute the test:* commands in parallel. Something like this: bun run /^test:/ or bun run test:*

What is the feature you are proposing to solve the problem?

N/A

What alternatives have you considered?

No response

@azat-io azat-io added the enhancement New feature or request label Sep 8, 2023
@Electroid Electroid added the npm Something that relates to the npm-compatible client label Sep 8, 2023
@Electroid
Copy link
Contributor

This is cool, would probably work well as a glob matcher.

@pratiqdev
Copy link

This would be a great feature, especially if it supported some flags for parallel/serial tasks like 'concurrently' or 'npm-run-all'

@gersongoulart
Copy link

Exactly what I'm looking for. I'm trying to use bun on a project which relies on 'npm-run-all' but it fails with error: script "X" exited with code 1 (SIGHUP)

@moQuez
Copy link

moQuez commented Nov 13, 2023

Same here. I'd love to have that without having to rely on an external package/tool to do so.

@gersongoulart in the mean time you can use concurrently as suggested earlier...

for me it works like so:

bun run --bun concurrently "npm:dev:*"

with a package.json like:

{
  ...
  "scripts": {
    ....
    "dev:11ty": "eleventy --serve --input=src",
    "dev:css": "tailwindcss -i ./src/assets/css/tailwind.css -o ./_site/assets/css/style.css --watch",
  },
  "devDependencies": {
    ...
    "concurrently": "^8.2.2",
  },
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request npm Something that relates to the npm-compatible client
Projects
None yet
Development

No branches or pull requests

5 participants