To configure the monorepo for development, the following should be installed locally:
-
Nodejs version 16 LTS. We recomemnd using nvm
-
npm version 8.x.x
-
pnpm version 7.1.0
We recommend using npm. Run the following command to install:
npm install -g pnpm@7.1.0
- Fork this repo.
- Clone your fork to your local machine.
- Install dependencies for all packages and starters using the following command:
pnpm install
- Install the husky pre-commit hooks. Run the following command:
pnpm husky install
There are several scripts you can use on your monorepo.
-
Test all projects in the monorepo that have a test script:
pnpm test
-
Build all packages in the monorepo:
pnpm build:pkgs
-
Build all starters in the monorepo:
pnpm build:starters
-
Build all projects in the monorepo:
pnpm build:all
-
Run commands in a targeted project, folder, or workspace, using the
pnpm
filter flag.For example, to start the Gatsby starter from the root of the monorepo (filter by namespace):
pnpm --filter './starters/gatsby-wordpress-starter' develop
-
Lint in the starters and filter by directory:
pnpm --filter './starters/**' lint
-
Run documentation:
pnpm --filter './web start'
To generate a new changeset, run pnpm changeset
in the root of the repository. The generated Markdown files in the .changeset
directory should be committed to the repository.
-
To increase the versions of the packages and dependencies previously specified with
pnpm changeset
and update the changelog files, run the following command:pnpm changeset version
-
Run
pnpm install
. This will update the lockfile and rebuild packages. -
Commit the changes.
-
Confirm your publishing scope by running the following command in
pantheon-systems
:pnpm config get scope
Alternatively, you can use the command
pnpm config set scope @pantheon-systems
. -
To publish all public packages that have versions that are not currently in the registry, use the following command:
pnpm publish -r --access public
-
Is the code in this repository not working as expected? Open a bug report here
-
Is there something you would like to see added to this project? Open a feature request here
For more information on contributing to this project, see CONTRIBUTING.md