Remove npm dependency from Makefile
This commit is contained in:
parent
4aa4d3b533
commit
c6af9b1cba
3 changed files with 10 additions and 26 deletions
3
www/.gitignore
vendored
3
www/.gitignore
vendored
|
@ -1,4 +1,3 @@
|
||||||
|
bin
|
||||||
elm-stuff
|
elm-stuff
|
||||||
node_modules
|
|
||||||
package-lock.json
|
|
||||||
public/elm.js
|
public/elm.js
|
||||||
|
|
20
www/Makefile
20
www/Makefile
|
@ -4,30 +4,28 @@ TARGET=public/elm.js
|
||||||
SOURCE=src/App.elm
|
SOURCE=src/App.elm
|
||||||
|
|
||||||
ELM_FILES = $(shell find src -type f -name '*.elm')
|
ELM_FILES = $(shell find src -type f -name '*.elm')
|
||||||
NODE_BIN = ./node_modules/.bin
|
ELM = ./bin/elm
|
||||||
ELM = $(NODE_BIN)/elm
|
|
||||||
ELM_LIVE = $(NODE_BIN)/elm-live
|
|
||||||
|
|
||||||
ELMMAKE_FLAGS =
|
ELMMAKE_FLAGS =
|
||||||
ifeq ($(DEBUG),1)
|
ifeq ($(DEBUG),1)
|
||||||
ELMMAKE_FLAGS += --debug
|
ELMMAKE_FLAGS += --debug
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: node-deps $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
node-deps:
|
$(ELM):
|
||||||
npm i
|
mkdir -p ./bin
|
||||||
|
curl -sL https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz \
|
||||||
|
| gunzip > $@
|
||||||
|
chmod +x $@
|
||||||
|
|
||||||
$(TARGET): $(ELM_FILES)
|
$(TARGET): $(ELM_FILES) $(ELM)
|
||||||
$(ELM) make $(ELMMAKE_FLAGS) $(SOURCE) --output $@
|
$(ELM) make $(ELMMAKE_FLAGS) $(SOURCE) --output $@
|
||||||
|
|
||||||
clean-deps:
|
clean-deps:
|
||||||
|
rm -rf bin
|
||||||
rm -rf elm-stuff
|
rm -rf elm-stuff
|
||||||
rm -rf node_modules
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(TARGET)
|
rm -f $(TARGET)
|
||||||
rm -rf elm-stuff/build-artifacts
|
rm -rf elm-stuff/build-artifacts
|
||||||
|
|
||||||
run: all
|
|
||||||
PATH="$(NODE_BIN):$$PATH" $(ELM_LIVE) $(SOURCE) --dir public --open -- $(ELMMAKE_FLAGS) --output $(TARGET)
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
"name": "tutor",
|
|
||||||
"description": "Tutor",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"author": "Correl Roush <correl@gmail.com>",
|
|
||||||
"license": "MIT",
|
|
||||||
"devDependencies": {
|
|
||||||
"elm": "0.19.1"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"elm-live": "^4.0.2"
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue