An open API service indexing awesome lists of open source software.

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

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.