Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

egghead.io

Publish JavaScript packages on npm

via egghead.io

Overview

npm is like a giant library of code building blocks. There are tons of these “blocks”, aka “packages” that we can compose together to build cool things. We can use packages by other developers, but we can also write and publish our own.
In this course we will learn how to create, publish, and update our own packages. We will create a JavaScript utility module to filter out sensitive words from a string, including tests and development file watching. We will then cover publishing and updating our package. This same approach can be used to create and publish other types of packages too like components (React, Angular, Web Components etc.) and command line interfaces.

Syllabus

  • Add version control to npm packages using git init
  • Add manifest files to npm packages using npm init
  • Set up compilation of source code using babel with npm scripts
  • Run builds on file changes using watch with npm scripts
  • Set up testing of source code using jest with npm scripts
  • Add package functionality using npm scripts
  • Test npm packages locally in another project using npm link
  • Document npm packages using README files
  • Publish npm packages using npm publish
  • Update published npm packages using np

Taught by

Trevor Miller

Reviews

Start your review of Publish JavaScript packages on npm

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.