Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iansu/blarn
A Yarn wrapper with extra functionality
https://github.com/iansu/blarn
cli npm package-management package-manager typescript yarn
Last synced: about 1 month ago
JSON representation
A Yarn wrapper with extra functionality
- Host: GitHub
- URL: https://github.com/iansu/blarn
- Owner: iansu
- License: mit
- Created: 2020-04-04T21:23:33.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-04-25T01:10:04.000Z (over 1 year ago)
- Last Synced: 2024-11-14T13:23:32.996Z (about 2 months ago)
- Topics: cli, npm, package-management, package-manager, typescript, yarn
- Language: TypeScript
- Size: 636 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Blarn
A Yarn wrapper with extra functionality
## Features
- 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.## Usage
### Requirements
- You must have Yarn 1 installed and available on your path
### Installation
```sh
// npm
npm install -g blarn// yarn
yarn global add blarn
```### Upgrading
```sh
// npm
npm install -g blarn// yarn
yarn global upgrade blarn --latest
```### Running Yarn commands
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.
### Examples
#### Adding packages
`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.
### Removing packages
`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.
### Showing linked packages in a project
`blarn linked`
### Showing all packages available to be linked
`blarn linkable`
### Unlinking all linked packages in a project
`blarn unlink-all`
## Contributing
### Running locally
1. Fork and clone this repo
1. Run `yarn`
1. Run `yarn build` or `yarn watch`
1. Run `yarn start` or `bin/blarn.js`## Acknowledgements
This project was inspired by [Yarn 2](https://yarnpkg.com/) and [Bojack Horseman](https://bojackhorseman.fandom.com/wiki/Diane_Nguyen).