-
|
How would you go about creating a npm verify script, which should run 3 other scripts: check, lint and typecheck, where scripts may look like this: A simple version is: Is there a better way? How to run in parallel using vp? But Or am I doing it wrong and VitePlus would integrate other linters and typechecking? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
@lttr You can implement concurrent execution of multiple scripts through the $ vp run verify
VITE+ - The Unified Toolchain for the Web
$ echo 'task1 start' ⊘ cache disabled
task1 start
$ sleep 1 ⊘ cache disabled
$ echo 'task3 start' ⊘ cache disabled
task3 start
$ sleep 1 ⊘ cache disabled
$ echo 'task2 start' ⊘ cache disabled
task2 start
$ sleep 1 ⊘ cache disabled
$ echo 'task1 done' ⊘ cache disabled
task1 done
$ echo 'task3 done' ⊘ cache disabled
task3 done
$ echo 'task2 done' ⊘ cache disabled
task2 done
$ echo verify done ⊘ cache disabled
verify done
---
vp run: 0/10 cache hit (0%). (Run `vp run --last-details` for full details) |
Beta Was this translation helpful? Give feedback.
@lttr You can implement concurrent execution of multiple scripts through the
dependsOncapability of vp tasks. For example, this demo https://github.com/why-reproductions-are-required/vp-run-parallel-depends-on-demo/blob/main/vite.config.ts#L20 - running thevp run verifycommand will first concurrently execute the 3 scripts task1/2/3.