-
Notifications
You must be signed in to change notification settings - Fork 5
Publishing to npm
Huy Tran edited this page Apr 22, 2022
·
5 revisions
- This process requires code changes. Create a new branch off of main.
- In command prompt, type
npm login
. This will login your profile that connects to the AI2 Repo - Build the library:
- In the
ui/library
directory, runyarn build
. - This should rebuild two files in the
ui/library/dist
directory:pdf-components.js
andindex.d.ts
.
- In the
- Increment the version number:
- In
ui/library/dist/package.json
, increment theversion
property.
- In
- Commit your changes, push your branch, and submit a pull request.
- Tag the new version:
- Run
git tag v0.0.x
(substitute 0.0.x with the appropriate version number) - Run
git push --tags
- Run
- Publish to npm:
- In
ui/library/dist
directory, runnpm publish
. If this is successful, npm will print out package details as a success message. - Within a couple minutes of successfully publishing, you will be able to pull the newest version of our library into your project! 🥳
- In
Resource: how to format a version number