Make

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.

Targets

start (default)

Usage: make start or make

Throws up a development server (see Server).

.PHONY: start build doc docker-build docker-run docker-run-bash lint test

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

build

Usage: make build

Compiles a production ready build in the build folder.

	npm run start

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

install

Usage: make install

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

	npm run build

# Install dependencies (dev + prod)