Minally styled, accessible, React component primitives that can be copy and pasted into your project.
yarn build- Build all packages, including the Storybook siteyarn start- Run all packages locally and preview with Storybookyarn lint- Lint all packagesyarn changeset- Generate a changesetyarn clean- Clean up allnode_modulesanddistfolders (runs each package's clean script)
This monorepo includes the following packages and applications:
packages/wethegit-components-cli: CLI companion for@wethegit/componentspackages/wethegit-components: Core React components and documentation with Storybookpackages/tsconfig: Sharedtsconfig.jsons used throughout the monorepopackages/eslint-config-custom: ESLint config used throughout the monorepo
Each package and app is 100% TypeScript. Workspaces enables us to "hoist" dependencies that are shared between packages to the root package.json. This means smaller node_modules folders and a better local dev experience. To install a dependency for the entire monorepo, use the -w workspaces flag with yarn add.
To learn more about each package, see the README in each package's folder.
Running yarn build from the root of the Turborepo will run the build command defined in each package's package.json file. Turborepo runs each build in parallel and caches & hashes the output to speed up future builds.
We use Changesets to manage versions, create changelogs, and publish to npm. It's preconfigured so you can start publishing packages immediately.
To generate your changelog, run:
yarn changeset-
Which packages would you like to include? – This shows which packages changed and which have remained the same. By default, no packages are included. Press
spaceto select the packages you want to include in thechangeset.1.1. Select only the packages that changed and note that we ONLY publish the
@wethegit/componentsand@wethegit/component-clipackages, so even if others changed, never select them. Everything else is used internally in the monorepo and the Storybook documentation is published separately to GitHub Pages. -
Which packages should have a major bump? – Press
spaceto select the packages you want to bump versions for orenterto skip. -
Which packages should have a minor bump? – Press
spaceto select the packages you want to bump versions for orenterto skip.3.1 If you skip both 2 and 3, the changeset will be a patch.
-
Write a summary for the changes.
-
Confirm the changeset looks as expected.
Changeset will create a patch file and give you a link for it. Open it, make sure everything is okay.
After you created the changeset update, you need to generate the changelogs and bump the versions of the packages, to do so run:
yarn version-packagesWhen you push your code to GitHub, to the main branch, the GitHub Action will run the release script defined in the root package.json.
Turborepo runs the build script for all publishable packages (excluding docs) and publishes the packages to npm.