Skip to content
This repository has been archived by the owner on Oct 28, 2019. It is now read-only.

Commit

Permalink
Add “all” and “watch” target to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel Rijnders committed Mar 7, 2018
1 parent d97aa3b commit 8646fb4
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
default: all

ELM_FILES = $(shell find src -name '*.elm')

SHELL := /bin/bash
NPM_PATH := ./node_modules/.bin

export PATH := $(NPM_PATH):$(PATH)

default: all

all:
elm-make --warn --yes src/Main.elm --output dist/main.js
all: $(ELM_FILES)
@elm-make --warn --yes src/Main.elm --output dist/main.js

clean:
@rm -Rf dist/*
Expand All @@ -22,5 +24,11 @@ distclean: clean
help:
@echo "Run: make <target> where <target> is one of the following:"
@echo " all"
@echo " clean"
@echo " deps"
@echo " distclean"
@echo " help"
@echo " watch"

watch:
find src -name '*.elm' | entr make all

0 comments on commit 8646fb4

Please sign in to comment.