Run npm scripts in parallel

InstructorElijah Manor

Share this video with your friends

Send Tweet

In this lesson we will look at running several npm scripts in parallel. Sometimes you don’t need scripts to be run in series and switching them to run in parallel can increase performance since they are not blocking each other. At the end you need to add a wait command so they can be terminated with ^C

rasenplanscher
rasenplanscher
~ 3 years ago

On the one hand understandable, on the other hand a little head-up to novices would be highly appropriate, seeing as you set out to educate people from the ground up. In my less experienced days, I would have canned and cursed your course and you at this point, now it's just a thumb down.

This is actually a pretty big deal because due to your use of a Microsoft editor, there's no obvious indication that you are working on a non-Windows system. Personally, I have enough experience to know that (zsh, slashes and such), but you cannot expect that, and according to your answer, you were aware of that problem.

Also, just because Macs are popular, they should not be assumed to be the only game in town.

Finally, I think by going this "simple" route, you are doing a grave disservice to your audience and the whole development community. This way, you say "you can do this" and later add "but then you have a problem, so do it like this instead". I think it would be far better to say "to parallelize, use npm-run-all" and later explain why. If a novice does something without full knowledge, rather have them do it in a proper way. The additional complexity is minimal, the value for them and everybody else is quite profound. As an educator, you take up responsibility for the pattern you promote. And if somebody checks out at this point, they will mess up. As said before, unexperienced Windows users may bail on you here, and they too may then lack essential knowledge. They might even work around or without npm in the future because "it doesn't work properly". Think about that...

rasenplanscher
rasenplanscher
~ 3 years ago

Also, the lesson doesn't reference the correct code state