Skip to main content

Getting Started

Prerequisites

  • pnpm
    • If you're using Node.js version ^14.19 or ^16.9 you just need to enable pnpm via corepack.
    • Otherwise install via npm i -g pnpm

Create a new CoSpace

Initialize

npx cospace@latest init my-cospace
cd my-cospace
  1. Clone all the repos you want to link together under the repos sub directory.

  2. Update the pnpm-workspace.yaml file with all the packages you want to add to your CoSpace. By default all packages under the repos directory will be added to your CoSpace, but you probably want to add them at a more granular level.

  3. Update the cospace.code-workspace file with all the repos you want to add to your vscode multi-root workspace.

  4. Run pnpm exec cospace override to link all the packages in your CoSpace together.

  5. Run pnpm install to install all the packages you've added to your CoSpace.

  6. Run pnpm build to build all the packages you've added to your CoSpace using your monorepo task runner. By default we use lage, but turborepo should theoretically work.