Skip to content
Discussion options

You must be logged in to vote

You can test your npm package locally using npm link:

  1. Inside your package folder, run:
    npm link

  2. Go to the project where you want to test it:
    npm link your-package-name

  3. Now you can import/require it as if it was installed normally.

When you're ready to publish:

  1. Make sure you have an npm account at npmjs.com
  2. Run npm login in your terminal
  3. Run npm publish

That's it — your package will be live on npm!

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by smayl079
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
npm
Labels
Question Ask and answer questions about GitHub features and usage npm Discussions around programming langages, open source and software development source:ui Discussions created via Community GitHub templates
2 participants