Skip to main content
CF

How to Use npm Scripts as Your Build Tool

52m 53s
English
Paid

Unlock the power of npm scripts with this comprehensive course designed to elevate your development workflow. We start from the basics and progressively build a dynamic website, introducing essential techniques and tools along the way. By the end of this course, you’ll be equipped with the knowledge and skills needed to create and customize your own build scripts effectively.

Course Overview

Dive into the world of npm scripts and discover how they can streamline your build process. Whether you're new to npm or looking to refine your skills, this course provides practical, hands-on experience.

Why Use npm Scripts?

Learn about the advantages of using npm scripts as a build tool, including simplicity, flexibility, and the ability to eliminate dependency on more complex tools.

Course Structure

  • Introduction to npm Scripts: Get acquainted with npm scripts and their basic functions.
  • Setting Up Your Project: Step-by-step guidance to prepare your environment for npm script usage.
  • Building a Website: Apply your newfound knowledge as you construct a small, functional website throughout the course.
  • Advanced Techniques: Explore more complex topics to enhance your build scripts and improve efficiency.

Learning Objectives

By the conclusion of this course, you will be able to:

  • Understand the basics and benefits of npm scripts as a build tool.
  • Create and manage scripts for automating build tasks.
  • Integrate and troubleshoot scripts within your projects.
  • Utilize advanced npm script techniques to optimize performance.

About the Author: 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.

Watch Online 21 lessons

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

Course content

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

Related courses

Frequently asked questions

What is How to Use npm Scripts as Your Build Tool about?
Unlock the power of npm scripts with this comprehensive course designed to elevate your development workflow. We start from the basics and progressively build a dynamic website, introducing essential techniques and tools along the way. By…
Who teaches How to Use npm Scripts as Your Build Tool?
How to Use npm Scripts as Your Build Tool is taught by egghead.io. You can find more courses by this instructor on the corresponding source page.
How long is How to Use npm Scripts as Your Build Tool?
How to Use npm Scripts as Your Build Tool contains 21 lessons with a total runtime of 52 minutes. All lessons are available to watch online at your own pace.
Is How to Use npm Scripts as Your Build Tool free to watch?
How to Use npm Scripts as Your Build Tool is part of CourseFlix's premium catalog. A CourseFlix subscription unlocks the full video player; the course description, table of contents, and preview information are available to everyone.
Where can I watch How to Use npm Scripts as Your Build Tool online?
How to Use npm Scripts as Your Build Tool is available to watch online on CourseFlix at https://courseflix.net/course/how-to-use-npm-scripts-as-your-build-tool. The page hosts every lesson with the integrated video player; no download is required.