@naretini/npm-hello-world
1.0.4 • Public • Published
Basics on How to publish packages to npm
- create a npm account and login
npm login
unername: naretini
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 git@github.com: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
npm install --global np
np --help
- add repo info to package.json to publish release / tags on github
"repository": {
"type": "git",
"url": "git@github.com:naretini/npm-hello-world.git"
}
Readme
Keywords
nonePackage Sidebar
Install
npm i @naretini/npm-hello-world
Weekly Downloads