- [Instructor] When you want to publish your package,
there are a few requirements you need to follow
and items you need to have.
First, make sure you have an npm account.
Only registered users with npm can publish packages.
You can use npm all you want without an account,
but when you publish your package, you need one.
Second, and this isn't mandatory, but highly recommended.
Create a well-documented README file
so people that are looking for your package
or find it know what this package is about.
And usage, if you're building a package
you'd like others to leverage for their obligations,
they need to understand how to use it.
For naming your package, make sure you follow these rules,
and I'm literally going over the npm policies verbatim
to make sure I cover them all.
Make sure the name of your package is unique,
is descriptive, meets the npm policy guidelines.
So don't give your package an offensive name
and don't use someone else trademark name
or violate the npm trademark policies.
And this is for scoped packages.
And if you don't know what a scoped package is,
it's when you scoped all your packages within a domain.
And it's typically written with an at sign
before the domain so people can find packages
related to you or a framework.
For example, all the native packages related to angular
are scoped with @angular
like @angular/cli
or @angular/core.
These are scoped packages.
Unscoped packages are any packages
that aren't starting with an at sign
like Redux or React.
So if you're doing a unscoped package,
you need to make sure the name
is not already owned by someone else,
is not spelled in a similar way to another package name,
and will not confuse others about authorship.