-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update readme, publish to new pkg name as v0.4.0
- Loading branch information
1 parent
7151ee4
commit 8902cad
Showing
3 changed files
with
52 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
node_modules/ | ||
.pnpm-debug.log | ||
|
||
test/ | ||
test/ | ||
docs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters