3 This plugin adds completion for the [Yarn package manager](https://yarnpkg.com/en/),
4 as well as some aliases for common Yarn commands.
6 To use it, add `yarn` to the plugins array in your zshrc file:
12 ## Global scripts directory
14 It also adds `yarn` global scripts dir (commonly `~/.yarn/bin`) to the `$PATH`.
15 To disable this feature, set the following style in your `.zshrc`:
18 zstyle ':omz:plugins:yarn' global-path false
23 | Alias | Command | Description |
24 | ----- | ----------------------------------------- | ----------------------------------------------------------------------------- |
25 | y | `yarn` | The Yarn command |
26 | ya | `yarn add` | Install a package in dependencies (`package.json`) |
27 | yad | `yarn add --dev` | Install a package in devDependencies (`package.json`) |
28 | yap | `yarn add --peer` | Install a package in peerDependencies (`package.json`) |
29 | yb | `yarn build` | Run the build script defined in `package.json` |
30 | ycc | `yarn cache clean` | Clean yarn's global cache of packages |
31 | yd | `yarn dev` | Run the dev script defined in `package.json` |
32 | yga | `yarn global add` | Install packages globally on your operating system |
33 | ygls | `yarn global list` | Lists global installed packages |
34 | ygrm | `yarn global remove` | Remove global installed packages from your OS |
35 | ygu | `yarn global upgrade` | Upgrade packages installed globally to their latest version |
36 | yh | `yarn help` | Show help for a yarn command |
37 | yi | `yarn init` | Interactively creates or updates a package.json file |
38 | yin | `yarn install` | Install dependencies defined in `package.json` |
39 | yln | `yarn lint` | Run the lint script defined in `package.json` |
40 | ylnf | `yarn lint --fix` | Run the lint script defined in `package.json`to automatically fix problems |
41 | yls | `yarn list` | List installed packages |
42 | yout | `yarn outdated` | Check for outdated package dependencies |
43 | yp | `yarn pack` | Create a compressed gzip archive of package dependencies |
44 | yrm | `yarn remove` | Remove installed packages |
45 | yrun | `yarn run` | Run a defined package script |
46 | ys | `yarn serve` | Start the dev server |
47 | yst | `yarn start` | Run the start script defined in `package.json` |
48 | yt | `yarn test` | Run the test script defined in `package.json` |
49 | ytc | `yarn test --coverage` | Run the test script defined in `package.json` with coverage |
50 | yuc | `yarn global upgrade && yarn cache clean` | Upgrade global packages and clean yarn's global cache |
51 | yui | `yarn upgrade-interactive` | Prompt for which outdated packages to upgrade |
52 | yuil | `yarn upgrade-interactive --latest` | Prompt for which outdated packages to upgrade to the latest available version |
53 | yup | `yarn upgrade` | Upgrade packages to their latest version |
54 | yv | `yarn version` | Update the version of your package |
55 | yw | `yarn workspace` | Run a command within a single workspace. |
56 | yws | `yarn workspaces` | Run a command within all defined workspaces. |