An open API service indexing awesome lists of open source software.

https://github.com/reaxi/wksp

workspaces / monorepo management tool
https://github.com/reaxi/wksp

cli hacktoberfest hacktoberfest-accepted management monorepo nodejs workspace workspaces yarn

Last synced: 11 months ago
JSON representation

workspaces / monorepo management tool

Awesome Lists containing this project

README

          

# wksp

[npm](https://npmjs.com/package/wksp)
Maintained

yarn **w**or**ksp**aces extension

> monorepo management tool

## Table of Contents:

0. [Requirements](#Requirements)
1. [Running](#Running)
2. [Examples](#Examples)

## Requirements

[yarn](https://yarnpkg.com/getting-started/install)

[node.js](https://nodejs.org/en/)

## Running

**Install**

```
npm i -g wksp
```

**then**

```
wksp
```

> shorthand for: yarn **w**or**ksp**ace \

> wksp will detect the package name automatically (if run inside the project folder)

if your current directory is the workspace root you can specify the name

```
wksp -n my-app
```

> shorthand for: yarn **w**or**ksp**ace \ \

### Variadic arguments

Variadic arguments are supported, (any arguments for the command)

```sh
wksp add react react-dom react-router
# cli cmd args...
```

### Passing options

Options that are specific to yarn, require an `--` `--options`

```sh
wksp add tailwindcss postcss autoprefixer -- --dev
# cli cmd args... -- yarn options
```

this applies when running scripts

```sh
wksp start -- --port 3002 --watch
# cli cmd -- script options
```

### Compatibility options

`-D` or `--dev` save as dev dependency

`-E` or `--exact` save exact dependency

`-P` or `--peer` save as peer dependency

some terminals doesn't allow passing options `--`

you can use compatibility options directly:

> `wksp add -D typescript`

---

## Examples

### root

cwd: `.../monorepo/`

```
projects/
/client/
/server/
/ui-lib/
```

```
wksp start -n client
```

> --name

### project

cwd: `.../monorepo/projects/server`

```
wksp start
```

> wksp will detect the package name related with this folder and run the start script defined in package.json

---

Have a great idea how we can extend yarn workspaces features ?
[suggest here](https://github.com/Andrew-Colman/wksp/issues/new)