-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the amat-react wiki!
IMPORTANT: Use yarn
for everything. Or, if you must, use npm
for everything. Do not mix and match commands. They seem to work in different spaces, and won't know where each others' packages are linked.
- Update your project's version number in the
package.json
file - Build your project
- Publish your project with the command
yarn publish
It really is that easy. If you run into permissions issues, contact me (Kim Thompson) or someone else on the web team, and we can get you added to the @apmg group
Let's say you're not quite ready for the world to see this package yet, but you want to see it in action. Here's how you make a beta build.
- Update your project's version number in the
package.json
file, then add the text-beta.0
to the end. This means that if the final version of your change will be under1.3.3
, you'd name this package1.3.3-beta.0
. Increment that final "0" if you end up publishing more betas. - Build your project
- Publish your project with the command
yarn publish --tag beta
This means your version will be accessible to everyone online but not overtake the mainline releases for anyone else installing your library.
If you want to test things more immediately and with less building, look into the link
command. Here's how you can use it. For the purposes of this walkthrough, let's say that you are building the library @apmg/amat
to be used in MPR News's website.
In @apmg/amat
- Build your project
- Run the command
yarn link
In MPR News
- Run the command
yarn remove @apmg/amat
- Run the command
yarn link @apmg/amat
MPR News should now be using your local, just-built version of @apmg/amat