1. 18
    Avoid Duplicate Commands by Calling one NPM Script from Another
    1m 59s

Avoid Duplicate Commands by Calling one NPM Script from Another

InstructorAndy Van Slaars

Share this video with your friends

Send Tweet

We can get a lot of utility through CLI tools invoked via npm scripts. Many of these tools have APIs with many flags and options, meaning we will frequently find ourselves using the same CLI tool in multiple npm scripts, often with only minor differences. In this lesson, we'll take two very similar npm scripts and see how to remove the duplication by calling one script from another and passing in additional flags.