Usually, if you run into working with team, you might want to speed up a little on cloning the codes, and some of the steps required for your application.
For me, I do this:
- Create
.bin
directory -
.bin
contained any bash scripts that needed for my team to use.
In this post, just a use case:
First time cloning the repository, what need to be done next? I wrote the following code in .bin/install
:
TLDR;
#!/usr/bin/env bash
[ ! -d vendor/ ] && composer install
[ ! -f .env ] && cp .env.example .env && php artisan key:generate
[ ! -d node_modules/ ] && npm install && npm run build
[ ! -f todo.md ] && touch todo.md
Above are the baseline, you may add as you see fit.
So each time the code get cloned, just run . .bin/install
.
Just a small improvement of productivity. :)
Top comments (0)