Publishing the NPM package
If you don’t already have one, you’ll need to sign up for a free NPM account. Your NPM user will then need to be granted owner
permissions to the tgam-patterns
package. You can check whether or not you’ve been granted the necessary permissions by running npm owner list
.
Assuming you have the necessary permissions, you should be able to update the package version number and publish it as follows:
- Make sure you’re up-to-date with the latest on the
master
branch by runninggit fetch
, thengit checkout master
, thengit pull --rebase
. - Increment the NPM package’s version number via
npm version patch
(see the NPM documentation for more options). This will update thepackage.json
file and create a commit for you. - Push the newly-created commit via
git push origin master
. - Publish the NPM package and push it out to the NPM registry via
npm publish
- If
npm publish
is unsuccessful, you may need to login to your NPM account first, vianpm login
.