-
Notifications
You must be signed in to change notification settings - Fork 42
npm yarn Publish Guide
Kohhee Peace edited this page May 27, 2022
·
1 revision
git clone https://github.com/kohheepeace/mr-pdf.git
$ yarn version
info Current version: 1.0.9
question New version: 👉 Here type new version...
this yarn version
is equivalent with
- update
package.json
version tov1.1.0
- Then commit "v1.1.0"
- git tag
v1.1.0
In step 2, we created new commit and tag so push it to Github.
git push
git push --tags
This will publish your package to npm.
yarn build
yarn publish
But in this repo, we're using prepare
scripts not to forget build before publish.
"scripts": {
"prepare": "tsc"
},
https://docs.npmjs.com/cli/v7/using-npm/scripts#life-cycle-scripts
Check new version is correctly published. 👇