Skip to content

Commit

Permalink
update readme, publish to new pkg name as v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aruniverse committed Feb 23, 2022
1 parent 7151ee4 commit 8902cad
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
.pnpm-debug.log

test/
test/
docs/
53 changes: 49 additions & 4 deletions cospace/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,52 @@
# CoSpace

To get started, open a new shell and run:
Setup a `CoSpace` to link multiple (mono)repos together!

```sh
$ npx cospace@latest
```
## Getting Started

### Pre-requisites

- [pnpm](https://pnpm.io/installation)
- If you're using [Node.js](https://nodejs.org/en/download/) version ^14.19 or ^16.9 you just need to enable pnpm via [corepack](https://github.com/nodejs/corepack).

### Create a new `CoSpace`

#### Initialize

```bash
npx cospace@latest init my-cospace
```

#### Link your (mono)repos

```bash
cd my-cospace
```

1. Clone all the repos you want to link together under the `repos` sub directory.

1. 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 be more specific.

1. Update the `cospace.code-workspace` file with all the repos you want to add to your [vscode multi-root workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces).

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

1. Run `pnpm build` to build all the packages you've added to your `CoSpace` using your monorepo task runner. By default we use [lage](https://microsoft.github.io/lage/), but [turborepo](https://turborepo.org/docs) should work as well.

## Advanced Usage

### override

```bash
npx cospace@latest override
```

- Automatically update the `pnpm.overrides` section of the `CoSpace`'s `package.json`, to ignore [semver](https://semver.org/) and always use the local package version from the workspace. Useful for when you have pre-release versions of packages in your workspace.

### purge

```bash
npx cospace@latest purge
```

- Recursievely delete all `node_modules` from the `CoSpace`.
2 changes: 1 addition & 1 deletion cospace/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cospace",
"version": "0.3.0",
"version": "0.4.0",
"description": "Setup a `CoSpace` to link multiple (mono)repos together!",
"author": "https://github.com/aruniverse",
"license": "MIT",
Expand Down

0 comments on commit 8902cad

Please sign in to comment.