2019-02-06 20:26:52 +00:00
|
|
|
SHELL = bash
|
|
|
|
|
2018-11-15 14:20:26 -06:00
|
|
|
NPM ?= $(shell command -v npm)
|
|
|
|
ifeq ($(NPM),)
|
|
|
|
$(error "Node not installed (https://nodejs.org/en/)")
|
|
|
|
endif
|
|
|
|
|
|
|
|
YARN ?= $(shell command -v yarn)
|
|
|
|
ifeq ($(YARN),)
|
|
|
|
# If yarn isn't already installed, it is built locally
|
|
|
|
YARN = ./node_modules/.bin/yarn
|
|
|
|
endif
|
|
|
|
|
|
|
|
.PHONY: all build clean
|
|
|
|
|
|
|
|
all: build
|
|
|
|
|
|
|
|
clean:
|
2019-02-06 20:26:52 +00:00
|
|
|
@rm -rf built/ 2>/dev/null || true
|
2018-11-15 14:20:26 -06:00
|
|
|
|
|
|
|
really-clean: clean
|
2019-02-06 20:26:52 +00:00
|
|
|
@rm -rf node_modules 2>/dev/null || true
|
2018-11-15 14:20:26 -06:00
|
|
|
|
|
|
|
build: built/index.built.js
|
|
|
|
|
|
|
|
built/index.built.js:
|
|
|
|
$(NPM) install
|
|
|
|
$(YARN) run build --progress
|