Introduction
Welcome to NPM Package!
NPM is a database (storage) for thousands of packages. Developers use it to share, manage, find, and install libraries.
![]() |
A package is sometimes called a library, plugin, framework, or tool. It is a directory (or project) with a |
Publishing NPM packages is a fantastic way to share your code with others and become a better developer. It is a vital step in contributing to the developer community and showcasing a variety of skills, such as:
- communication skills
- collaboration skills
- organizational skills
- technical skills
- documentation skills
- problem-solving skills
Becoming an NPM package publisher is a unique way to create a finished product that others can use as part of or the main component of their apps.
This beginner-friendly book discusses everything you need to know to create, test, and publish NPM packages like a pro.
How This Book Can Help You
The best way to learn is through progressive practice. In other words, the easiest way to become a proficient package publisher is to proactively build NPM plugins—rather than merely reading or watching videos about them.
As such, this book is intentionally project-oriented to get you to practice as much as possible while learning the fundamental concepts of becoming an NPM package publisher.
Therefore, you will do yourself a favor by opening your text editor (such as VS Code) and code-along as you go through the book. By so doing, you will avoid being part of those stuck in “Tutorial Hell.”
The Roadmap
This book’s main project is a Tweet Button—which you can scale up to whatever magnitude your imagination can afford.
Don’t let the project type scare you off! You are on for an exciting ride—where you will learn the fundamental concepts needed to publish any NPM package. So, give it a chance.
Dependencies
It is highly recommended that you use the exact version of dependencies specified in this book. By doing so, you will spend less time dealing with bugs that a newly released dependency version may cause.
After finishing this book’s lessons, you can upgrade the dependencies to the latest version. If the bump (update) causes a bug, search online or the package’s community for the appropriate fix.
Prerequisite
Familiarity with Git, GitHub, and JavaScript will help you learn NPM package publishing better. So, to be better prepared for this book’s content, it’s best to be familiar with the elementary aspects of those tools.
Questions and Comments
If you have questions or comments about this book, email contact@codesweetly.com or direct message me on Twitter (@oluwatobiss).
Let’s Get It Started!
The following chapter will discuss how to configure the project.
