Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kamilkisiela/bru
Bru 🤵helps you manage monorepos!
https://github.com/kamilkisiela/bru
bru lerna monorepo npm packages tools yarn
Last synced: 12 days ago
JSON representation
Bru 🤵helps you manage monorepos!
- Host: GitHub
- URL: https://github.com/kamilkisiela/bru
- Owner: kamilkisiela
- License: mit
- Created: 2018-10-03T10:30:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-31T09:32:57.000Z (about 6 years ago)
- Last Synced: 2024-12-19T08:39:50.266Z (20 days ago)
- Topics: bru, lerna, monorepo, npm, packages, tools, yarn
- Language: TypeScript
- Homepage:
- Size: 62.5 KB
- Stars: 9
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bru
Bru 🤵 helps you manage monorepos.
Try it out, it's lekker bru!
[![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg?maxAge=2592000)](https://raw.githubusercontent.com/kamilkisiela/bru/master/LICENSE)
[![npm](https://img.shields.io/npm/v/bru.svg)](https://www.npmjs.com/package/bru)- [Usage](#usage)
- [Commands](#commands)
- [Hooks](#hooks)# Usage
```sh-session
$ npm install -g bru$ bru COMMAND
running command...$ bru (-v|--version|version)
bru/1.0.0$ bru --help [COMMAND]
USAGE
$ bru COMMAND...
```# Commands
- [`bru add [versionOrTag]`](#bru-add-package-versionortag)
- [`bru bump `](#bru-bump-package-type)
- [`bru set `](#bru-set-package-versionortag)
- [`bru get [package]`](#bru-get-package)
- [`bru remove `](#bru-remove-package)
- [`bru check [package]`](#bru-check)## `bru add [versionOrTag]`
Adds a new package to the root (by default) or a specific local package
```
USAGE
$ bru add [versionOrTag]OPTIONS
-h, --help show CLI help
-D, --save-dev as dev dependency
-R, --root saves in root dir (default)
-P, --package saves in a package
```## `bru set `
Sets a new version of a package (specific or based on provided dist tag)
```
USAGE
$ bru setOPTIONS
-h, --help show CLI help
```### `bru get `
Displays a version of a package
```
USAGE
$ bru getOPTIONS
-h, --help show CLI help
```### `bru remove `
Removes a package
```
USAGE
$ bru removeOPTIONS
-h, --help show CLI help
-R, --root removes from root dir (default)
-P, --package removes from a package
```## `bru bump `
Bumps a version of a package.
Available types:
- major
- premajor
- minor
- preminor
- patch
- prepatch
- prerelease```
USAGE
$ bru bumpOPTIONS
-f, --force
-h, --help show CLI help
```## `bru check [package]`
Checks if every package (or specific one) is in the same version across entire project.
```
USAGE
$ bru check [package]OPTIONS
-h, --help show CLI help
```# Hooks
Bru allows to hook into changes in monorepo.
```json
{
"config": {
"bru": {
"hook": "./bru-events.js"
}
}
}
``````js
/**
* event: {
* type: string;
* data: any
* }
*/
module.exports = function(event) {
switch (event.type) {
case 'version':
console.log('Version changed', event.data);
break;
case 'add':
console.log('Dependency added', event.data);
break;
case 'remove':
console.log('Dependency removed', event.data);
break;
}
};
```