We use the old school GNU Make to manage shell entry points in LeanJS. You may prefer to use Gulp, Grunt, or some other task manager, but we don’t see any feature that we need and that Make does not provide.

It has the advantage to be understandable by non-javascript persons, including ops, and we use it to provide a language agnostic interface to our projects (we provide the same commands whether the project is written using javascript, python, ruby, java, php, ...).

The pros may be not very important for you, feel free to change the way you manage this.


start (default)

Usage: make start or make

Throws up a development server (see Server).

DOCKER ?= $(shell which docker)
NPM ?= $(shell which yarn || which npm)

# Phony targets (targets without matching file)


Usage: make build

Compiles a production ready build in the build folder.

# Start a development server.
# You need to run "npm install" before that.


Usage: make install

Wraps npm install, installs all project dependencies under node_modules, including development dependencies.

# Builds a production-ready release, under /build.
# It will be self contained, and it's the base of the docker image.