Skip to content

Support with npm package concurrently? #163

@roryabraham

Description

@roryabraham

Describe the feature

I have a custom script for npm run dev that runs three separate processes concurrently, each with their own label:

#!/bin/bash

set -e

# Concurrently run:
# 1. Watched webpack build (creating dist/server.bundle.js)
# 2. LiveReloadServer websocket server for opening and hot-reloading browser tabs.
#     - Note: this is intentionally a separate process from the express server,
#       because that server reboots with each updated webpack build,
#       so keeping track of connected browser tabs would be impossible
# 3. Express server, running the code in dist/server.bundle.js. This uses nodemon to reboot when the source code changes.
concurrently -k \
  --names 'WEBPACK,EXPRESS,HOT-REF' \
  --pad-prefix \
  --prefix '[{name}]' \
  --prefix-colors 'magenta,green,cyan' \
  'npm run watch' \
  'npm run serve' \
  'npm run ws'

I'd love to be able to use webpackbar for the webpack build (i.e: npm run watch), but when I run it via concurrently it just looks like this:

Image

Additional information

  • Would you be willing to help implement this feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions