https://github.com/oresoftware/botch
Setup a per-project development env with NPM
https://github.com/oresoftware/botch
developer-experience dx local-development nodejs npm
Last synced: about 1 month ago
JSON representation
Setup a per-project development env with NPM
- Host: GitHub
- URL: https://github.com/oresoftware/botch
- Owner: ORESoftware
- License: mit
- Created: 2016-12-22T06:57:45.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-05-30T03:43:56.000Z (about 8 years ago)
- Last Synced: 2025-06-04T19:18:30.086Z (about 1 year ago)
- Topics: developer-experience, dx, local-development, nodejs, npm
- Language: Shell
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Botch
>>> Create local development environments for each NPM project on your filesystem.
### Installation
There are two different avenues.
1. Just use your own shell script in each project.
```bash
npm install -g botch
```
then use this in .bash_profile/.bashrc:
```bash
export botch_shell_file_name="xxx.sh";
```
__**What this means:**__ _when you open a terminal, botch will attempt to source
a shell script named `xxx.sh`, from the present working directory._
2. To use botch default behavior for a project. This is recommended.
Simply install it to every project you want to use it with.
```bash
npm install -D botch
```
__**What this means:**__ _Botch will do the same thing as above, if the `$botch_shell_file_name` env is set.
But it will also pick up the `./node_modules/botch/bin.sh` file and run that for your project.
Primarily this modifies the $PATH to include the executables in ./node_modules/.bin.
This gives your local NPM executables *precendece*, since it prepends `./node_modules/.bin` to $PATH._
## Regardless of which method you use, make sure you add this to your .bash_profile/.bashrc files:
```bash
. "$HOME/.botch/shell.sh" # always source this file
. "$HOME/.botch/overrides.sh" # source this if you want to invoke botch when changing directories
```
The shell scripts will be available regardless of whether you install locally or globally.
Just source them.