Skip to content

monerium/js-monorepo

Repository files navigation

Monerium monorepo

What's inside?

This Turborepo includes the following packages/apps:

Apps and Packages

  • customer: a Next.js app, an open source Monerium client
  • @monerium/sdk: an SDK for interacting with the Monerium API
  • @monerium/sdk-react-provider: a React provider for the Monerium SDK
  • @repo/ui: a sharable stub React component library
  • @repo/eslint-config: eslint configurations (includes eslint-config-next and eslint-config-prettier)
  • @repo/postcss-config: postcss configurations
  • @repo/stylelint-config: stylelint configurations
  • @repo/typescript-config: tsconfig.json's used throughout the monorepo

Utilities

Build

To build all apps and packages, run the following command:

cd js-monorepo
pnpm build

Develop

To develop all apps and packages, run the following command:

cd js-monorepo
pnpm dev

Note: use pnpm dev --log-order stream for a more traditional log output.

Pipeline

We use release-please, for automated releases. The configuration file is located at release-please-config.json, and the manifest file is at .release-please-manifest.json. In general, you don't need to manually update the manifest file because the release-please action automatically updates it.

If you need to adjust a package version, you can update the release-please-config.json file with "release-as": "0.0.1" for that package. Just remember to remove it after the release.

To trigger a release, you merge a PR into the main branch. The release process will create a new release branch and a PR. When you merge this PR into the main branch, a release will be created.

The pipeline will automatically publish the following packages if there are changes when a release is created:

  • @monerium/sdk at 'packages/sdk'
  • @monerium/sdk-react-provider at 'packages/sdk-react-provider'
  • TBD: @repo/ui at 'packages/ui'

Useful links

Release please - Github action

Release please - Config file options

Remote Caching

Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.

By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:

cd my-turborepo
npx turbo login

This will authenticate the Turborepo CLI with your Vercel account.

Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:

npx turbo link

Useful Links

Learn more about the power of Turborepo:

FAQ

I merged a release PR, but it immediately opened a new PR for the same release.

Verify that the package version is not set to a specific version with "release-as" in the release-please-config.json file. If it is, remove it and merge the PR again.