@naretini/npm-hello-world
v1.0.4
Published
- create a npm account and login
Downloads
1
Readme
Basics on How to publish packages to npm
- create a npm account and login
npm login
unername: naretini
- create npm project:
mkdir npm-hello-world && cd $_
npm init --scope=naretini
- publish to npm (publicly): [ If your repository has a scope, you need to adjust the publish command ]
npm publish --access public
- create a repo on github and link to it:
git init
git remote add origin [email protected]:naretini/npm-hello-world.git
Best practice before (npm) publish:
Steps:
- Run tests (if there are any)
- Update version in package.json according to Semver
- Create a git tag according to Semver
- Push the package to Github
- Push the package to npm
- Create release notes for every update
Or use np [https://github.com/sindresorhus/np] - A better npm publish
npm install --global np
np --help
- add repo info to package.json to publish release / tags on github
"repository": {
"type": "git",
"url": "[email protected]:naretini/npm-hello-world.git"
}