This is a component library for the Myweed.club website.
It's used in both the blog and the app.
You will be doing most of your development in storybook but you will need to also be able to link this project to the app.
npm run storybook
We need to make sure we use the same version of react that is used in the app. To do this do the following commands.
npm install
npm link ../my-weed-club-ui/App/node_modules/react
- You have to rebuild every time you want to see your changes update on the front end. Yes, I agree, it is annoying. Feel free to fix this.
4.
npm run build
- Use either condensed command for minor
git checkout upstream/main && git pull upstream main && npm version patch && git push upstream --tags && git branch -d version && git checkout -b version && git push upstream version
- Or
- Check out a new branch from main
- Complete work, then push branch up and create a merge request.
- once approved, then merge.
-
git checkout upstream/main && git pull upstream main
- if you haven't renamed your remote then it's origin instead of upstream.
- you can also ignore the HEAD detached from ... message as it's fine.
-
npm version <major|minor|patch>
- Major for backwards break
- Minor for typical features
- patch for bugs/notes/maintenance
- Take note of the version that gets printed
- Also note that you're now on the new version branch and no longer detached from head.
- Next we create a branch from the new version we have checked out.
-
git checkout -b version
- if you get a message that version exist, then run
git branch -d version
and it should delete it, then repeat the command.
- if you get a message that version exist, then run
-
-
git push upstream version
- Example git push upstream v0.9.0
- create a merge request, the terminal should have produced a link for you to do this automatically.
- Merge in the new version.
git push upstream --tags
- Next you'll publish. Make sure you see that you're on the new version tag. You should be there by running the above commands
git checkout <new version you just made>
npm ci
npm run build
-
npm publish
- If you get an error about not being logged in, then run
npm login
and enter your credentials.
- If you get an error about not being logged in, then run