How do developers submit their GitHub repositories to the npm?
If you don't have a
package.json file, create one with:
Because your repo can contain a lot of things, make sure to include a "files" field in the
package.json to publish just those files to npm.
When you are sure all looks fine, publish it with:
These days, all package names are used. You can create packages scoped to your username. Give your package a name like
@yourusername/packagename and publish it with:
npm publish --access public
Hashnode is a friendly and inclusive dev community.
Come jump on the bandwagon!
💬 Ask programming questions without being judged
🧠 Stay in the loop and grow your knowledge
🍕 More than 500K developers share programming wisdom here
❤️ Support the growing dev community!