๐ฅ
Boom A fast & simple boilerplate generator, built with Rust.
Installing boom
This package is not yet downloadable on Brew or other package managers, so for now installing it takes slightly more work.
- Clone this repo into the directory of your choice:
git clone https://github.com/t4t5/boom.git
- Compile the code:
cd boom && cargo build
- Set an alias for "boom" in your
.zshrc
or.bash_profile
:
alias boom="{YOUR_DIR}/boom/target/debug/boom"
Using boom
Boom will automatically create a .boom
folder in your home directory. This is where all your boilerplate generators will be stored.
You can add this directory to your version-controlled dotfiles so that you don't lose your library of boilerplate templates.
Adding a boom template
To create a new boom template, run:
boom new <boom-template-name>
A new
directory will be created in your .boom
folder, with a boilerplate
directory and an init.sh
file inside it.
Add the files you want for your boilerplate in the boilerplate
directory, and the commands you want to run when starting a project using this boilerplate in init.sh
(like "npm install" for example).
Using your new boom template
boom <boom-template-name> <your-project-name>
This will create a new folder called
in whatever directory you're currently in, using the
boilerplate.
Adding others' templates
We encourage you to share your boom templates in a public dotfiles repo! That way, others can find and use your templates in their own projects.
To quickly clone someone else's template, you first need to install github-clone:
pip install github-clone
Now let's say you want to add t4t5's eleventy template to your own boom templates. You can then simply run:
boom add https://github.com/t4t5/dotfiles/tree/master/boom/templates/eleventy
You can now use this boilerplate using:
boom eleventy <your-project-name>
Todos
- Remove dependency on github-clone
- Show the output of scripts from templates'
init.sh
(so that you can see progress ofnpm install
for example) - Support calling
boom
command without any arguments. Show an interactive UI where you can pick from your templates.