Pantheon Decoupled Kit Monorepo

This repo is a collection of multiple projects, organized by pnpm workspaces.

Workspaces

There are two main workspaces in the monorepo, starters, and packages, along with a configs workspace and web which houses the documentation.

Starters

Each directory in this workspace represents a starter kit that is mirrored to a standalone repo at release time. Please use the monorepo to develop against the starters.

Packages

The starters have a dependency on one or more of our npm packages, which live in this workspace. Each directory in this workspace represents a library to be published on npm, and to be consumed by the public, and our starter kits.

Setup the Monorepo

To configure the monorepo for development, the following should be installed locally:

Node.js version 18 LTS. We recommend using nvm

npm version 9.x.x

pnpm version 8.x.x

We recommend using npm. Run the following command to install:


Configure the Monorepo

To contribute to this project, follow the directions below. Also see CONTRIBUTING.md for more information.

  1. Fork this repo
  2. Clone your fork to your local machine.
  3. Install dependencies for all packages and starters using the following command. A postinstall script will build the packages:
  4. Install the husky pre-commit hooks. Run the following command:

Useful Scripts

There are several scripts you can use in the monorepo.

To see all available scripts:

Test all projects in the monorepo that have a test script:

Build all packages in the monorepo:

Start the nextjs-kit in watch mode:

Build and run the documentation:

Run commands in a targeted project, folder, or workspace, using the pnpm filter flag.

For example, to start the Gatsby starter (filter by namespace):

Lint the starters (filter by directory):

If you need to run a command in a specific project, use the alias in the ROOT package.json scripts (pnpm run to see the full list in your terminal), or use a filter. Please do not cd into the project directory and use npm or yarn.


Versions and Releases

Generating a Changeset

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.

Creating and Publishing New Versions

Versions and releases are created as part of our CI process and typically should not be created manually.

Canary Releases

Each push to the canary (default) branch triggers the canary-release.yml GitHub Action workflow which will open a PR back to the repo, and on merge it will release any package with a changeset to the canary tag on GitHub and npm.


Bug Reports and Feature Requests

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


Further Reading

For more information on contributing to this project, see CONTRIBUTING.md

pnpm --filter './starters/**' lint
pnpm --filter gatsby-wordpress-starter develop
pnpm generate-docs && pnpm start:docs
pnpm watch:nextjs-kit
pnpm build:pkgs
pnpm test
pnpm run
pnpm husky install
pnpm install
npm install -g pnpm@8

Download Details:

Author: pantheon-systems

Official Github: https://github.com/pantheon-systems/decoupled-kit-js 

License: GPL-3.0 license

#wordpress #typescript 

Pantheon Decoupled Kit Monorepo
1.45 GEEK