UNPKG

631 BPlain TextView Raw
1POE_UI := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
2
3### Add node_modules executables to the path
4
5LOCAL_PATH := $(CURDIR)/node_modules/.bin:$(POE_UI)/node_modules/.bin
6PATH := $(LOCAL_PATH):$(PATH)
7
8### General targets
9
10start: node_modules .env
11 @$(shell cat .env | grep '^#' --invert-match | xargs) npm start
12
13clean:
14 rm -fr build components manifest.json
15
16### Install targets
17
18.env: .env.example
19 @cp $< $@
20
21node_modules:
22 @npm install
23
24### Build targets
25
26prod:
27 @mkdir -p build
28 @PATH=$(PATH) MANIFEST=manifest.json webpack --bail --config $(POE_UI)/webpack.config.js --output-path build
29
30.PHONY: clean build prod install