Hampster
Clones, installs, and links interdependent npm packages.
Installation
npm i -g hampster
Configuration
Put your package information in hampster.json
:
You can also use YAML format, with .yml
or .yaml
as the extension.
Usage
In the root directory where you want your packages to live, run:
hampster /path/to/hampster.json
Hampster can also download hampster.json
for you:
hampster https://example.com/path/to/hampster.json
This command will make Hampster do the following:
-
For every package defined in
hampster.json
, check if a directory by thatname
already exists in the current working directory. If no such directory exists, perform agit clone --recursive
on therepository
. -
For every package, run
npm link
inside its repository. -
For every package, inspect its
package.json
to build a dependency tree. -
Walk the dependency tree and run
npm link <dependencies>
where possible.
Options
--pull
Perform a git pull --recurse-submodules
for previously cloned repositories.
The remote and branch are never specified, so Git will decide.
--rebase
Like --pull
, but using git pull --rebase
.
--no-recursive
Perform git clone
without the --recursive
flag and git pull
without the
--recurse-submodules
flag.
--version
Display Hampster's version number.
Author
License
MIT