DEV Community

Nasrul Hazim Bin Mohamad
Nasrul Hazim Bin Mohamad

Posted on

Improve Development Productivity

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:

  1. Create .bin directory
  2. .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
Enter fullscreen mode Exit fullscreen mode

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)