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.
The pros may be not very important for you, feel free to change the way you manage this.
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. start:
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.