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

Question: Parallel with serial

Open amilajack opened this issue 9 years ago • 3 comments

Is it possible to compile serial and parallel tasks? Ex:

run-s lint run-p build

In this example, I'm assuming that build will run after lint completes

amilajack avatar Jul 21 '16 22:07 amilajack

Thank you for this issue.

Though I might not understand this issue, I think there are some solutions:

npm-run-all -s lint -p build:*
npm run lint && run-p build:*
"prebuild": "npm run lint",
"build": "run-p build:*"

mysticatea avatar Jul 21 '16 22:07 mysticatea

@mysticatea i think @amilajack meant nested task, example:

            /- `favicons` -> `imagemin` (`serial`)
           /-- `webfont` (`serial`)
`parallels`
           \-- `copy` (`serial`)
            \- `another-task` -> `another-task-too` -> `another-task-too-too` (`serial`)

alexander-akait avatar Sep 01 '16 13:09 alexander-akait

Yeah.. nested serial tasks within a parallel block would be useful. i guess it's possible if you added another script for the nested task but that won't scale well. and naming things is hard

for example i wanted to do this:

           +---> clean <--+
           |              |
           |              |
           |              +
           |          html:build
           +              ^
        js:build          |
           ^              +
           |          css:build
           |              ^
           |              |
           |              |
           +--------------+
                  |
                 rev

api could look something like this?

npm-run-all clean -p js:build [ -s html:build css:build ] -s rev

kentor avatar May 11 '17 07:05 kentor