A Yarn wrapper with extra functionality
- Automatically add and remove TypeScript
@types
packages when adding or removing packages in a TypeScript project - List linked and linkable packages, unlink all packages and automatically rerun Yarn after unlinking packages.
- You must have Yarn 1 installed and available on your path
// npm
npm install -g blarn
// yarn
yarn global add blarn
// npm
npm install -g blarn
// yarn
yarn global upgrade blarn --latest
Blarn will pass all commands and arguments through to Yarn. When adding packages in a TypeScript project it will execute a second yarn add
command to add any available @types
packages as dev dependencies. When removing packages any corresponding @types
packages will be added to the list of packages to remove.
blarn add yargs
If you run this command in a TypeScript project yargs
will be installed as a dependency and @types/yargs
will be installed as a dev dependency. If you run this command in a JavaScript project only yargs
will be installed as a dependency.
blarn remove yargs
If you run this command in a TypeScript project and @types/yargs
exists in package.json
both yargs
and @types/yargs
will be removed. If you run this command in a JavaScript project only yargs
will be removed.
blarn linked
blarn linkable
blarn unlink-all
- Fork and clone this repo
- Run
yarn
- Run
yarn build
oryarn watch
- Run
yarn start
orbin/blarn.js
This project was inspired by Yarn 2 and Bojack Horseman.