Skip to main content
CF

How to Use npm Scripts as Your Build Tool

52m 53s
English
Paid
Updated September 2026

How to Use npm Scripts as Your Build Tool is a 21-lesson 52 minutes self-paced course by egghead.io. npm scripts can replace much of what a heavier build tool does, and this course starts from the basics before progressively building a small dynamic website to show exactly how.

Course facts

Lessons
21
Duration
52 minutes
Level
All levels
Language
English
Updated
2026-09-11
Instructor
egghead.io
Price
Premium

npm scripts can replace much of what a heavier build tool does, and this course starts from the basics before progressively building a small dynamic website to show exactly how.

Why npm scripts

The course makes the case for npm scripts as a build tool in their own right: simple, flexible, and able to remove your dependency on more complex external tooling.

What you'll practice

  • Setting up a project to use npm scripts
  • Building a working website using scripts you write yourself
  • More advanced techniques for improving build efficiency

By the end, you'll be able to create and manage your own build scripts, integrate and troubleshoot them within real projects, and apply more advanced npm script techniques where they genuinely help.

Who teaches How to Use npm Scripts as Your Build Tool? egghead.io

egghead.io thumbnail

egghead.io is a US-based subscription video platform focused on short, focused screencasts on JavaScript ecosystem topics. Founded in 2012 by John Lindquist (a Google Developer Expert) and run by Joel Hooks, egghead pioneered the short-screencast format that most modern developer-education platforms now use — courses are typically broken into 2-5 minute lessons that each cover one specific concept or API.

The instructor roster includes many of the most cited names in the JavaScript ecosystem — Kent C. Dodds (whose Testing JavaScript launched on egghead before EpicWeb.dev), Andrew Del Prete, Hannah Davis, Lukas Ruebbelke, Tomasz Łakomy, Andy Van Slaars, and many others. Course material covers React, Next.js, TypeScript, Node.js, GraphQL, Vue, the testing tracks, RxJS / observables, and a long list of smaller libraries and tools.

The CourseFlix listing under this source carries over 20 egghead courses spanning that range. Material is paid; egghead itself runs on a monthly / annual subscription on the original platform. The bite-sized format suits developers learning incrementally during work hours rather than committing to multi-hour video sessions.

What lessons are included in How to Use npm Scripts as Your Build Tool?

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 21 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Create a basic package.json file
All Course Lessons (21)
#Lesson TitleDurationAccess
1
Create a basic package.json file Demo
01:57
2
Run the basic npm scripts
00:57
3
Create a custom npm script
01:18
4
Run npm scripts in series
01:00
5
Run npm scripts in parallel
02:06
6
Use a shorthand syntax for running multiple npm scripts with npm-run-all
01:39
7
Run a set of similar npm scripts with a wildcard
01:59
8
Use pre and post npm script lifecycle hooks
01:24
9
Pass arguments to npm scripts
01:04
10
Pipe data from one npm script to another
04:32
11
Run npm scripts when files change with onchange
02:07
12
Use package.json variables in npm scripts
01:23
13
Use custom config settings in your npm scripts
03:01
14
Run npm scripts with git hooks
01:57
15
Change the level of console output when running npm scripts
00:49
16
Make npm scripts cross-environment friendly
05:42
17
List available npm scripts and support tab completion
01:53
18
Add comments to your npm scripts
02:11
19
Pull out npm scripts into another file with p-s
05:53
20
Create a bash script to replace a complex npm script
02:56
21
Create a node script to replace a complex npm script
07:05
Unlock unlimited learning

Get instant access to all 20 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

What courses are similar to How to Use npm Scripts as Your Build Tool?

More courses by egghead.io

Frequently asked questions

What prerequisites are needed before taking this course?
This course requires a basic understanding of JavaScript and familiarity with the command line. While no prior experience with npm scripts is necessary, having a foundational knowledge of npm and package.json will be beneficial for following along with the lessons.
What will I build during the course?
Throughout the course, you will build a small, functional website. This project serves as a practical application of the concepts taught, allowing you to integrate npm scripts into a real-world development workflow and automate various build tasks.
Who is the target audience for this course?
The course is designed for developers who are either new to npm scripts or looking to refine their existing skills. It's particularly beneficial for those who want to streamline their build process and reduce dependency on more complex build tools.
How does this course differ from other build tool courses?
Unlike courses that focus on complex build tools, this course emphasizes the simplicity and flexibility of npm scripts. It provides a practical, hands-on approach to using npm scripts to automate build tasks without requiring additional dependencies or complex toolchains.
What specific tools or platforms are covered in this course?
The course extensively covers npm scripts, including creating custom scripts, using npm-run-all for running multiple scripts, integrating git hooks, and employing lifecycle hooks. It also touches on using tools like p-s for script management and onchange for triggering scripts when files change.
What topics are not covered in this course?
The course does not cover other build tools like Webpack, Gulp, or Grunt. It focuses exclusively on leveraging npm scripts for automating build tasks and does not delve into advanced JavaScript programming or backend development.
How much time should I expect to commit to this course?
The course consists of 21 lessons, each designed to be concise yet comprehensive. While the total runtime is not specified, students should allocate time for both watching the lessons and applying the concepts through hands-on practice with the project.