|
|
@ -1,10 +1,11 @@
|
|
|
|
ROOT=$(shell pwd)
|
|
|
|
ROOT=$(shell pwd)
|
|
|
|
BACKEND_ASSETS_DIR=backend/resources/public/compiled
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TARGET_CSS_DIR=$(BACKEND_ASSETS_DIR)/css
|
|
|
|
SOURCE_ASSETS_IMG_DIR=frontend/assets/img
|
|
|
|
|
|
|
|
SOURCE_ASSETS_IMG_FILES=$(wildcard frontend/assets/img/*)
|
|
|
|
|
|
|
|
TARGET_ASSETS_IMG_DIR=frontend/compiled/img
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TARGET_CSS_DIR=frontend/compiled/css
|
|
|
|
TARGET_CSS_FILE=$(TARGET_CSS_DIR)/style.css
|
|
|
|
TARGET_CSS_FILE=$(TARGET_CSS_DIR)/style.css
|
|
|
|
LIVE_CSS_DIR=frontend/compiled/css
|
|
|
|
|
|
|
|
LIVE_CSS_FILE=$(LIVE_CSS_DIR)/style.css
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TARGET_JS_DIR=$(BACKEND_ASSETS_DIR)/js
|
|
|
|
TARGET_JS_DIR=$(BACKEND_ASSETS_DIR)/js
|
|
|
|
TARGET_JS_FILE=$(TARGET_JS_DIR)/app.js
|
|
|
|
TARGET_JS_FILE=$(TARGET_JS_DIR)/app.js
|
|
|
@ -15,7 +16,7 @@ SOURCE_SASS_FILE=frontend/assets/sass/style.scss
|
|
|
|
INDEX_FILE=backend/resources/public/index.html
|
|
|
|
INDEX_FILE=backend/resources/public/index.html
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: compile
|
|
|
|
.PHONY: compile
|
|
|
|
compile: $(TARGET_JS_FILE) $(TARGET_CSS_FILE)
|
|
|
|
compile: $(TARGET_JS_FILE) $(TARGET_CSS_FILE) $(TARGET_ASSETS_IMG_DIR)
|
|
|
|
|
|
|
|
|
|
|
|
$(TARGET_JS_FILE): $(SOURCE_ELM_FILES)
|
|
|
|
$(TARGET_JS_FILE): $(SOURCE_ELM_FILES)
|
|
|
|
mkdir -p $(TARGET_JS_DIR)
|
|
|
|
mkdir -p $(TARGET_JS_DIR)
|
|
|
@ -25,9 +26,9 @@ $(TARGET_CSS_FILE): $(SOURCE_SASS_FILE)
|
|
|
|
mkdir -p $(TARGET_CSS_DIR)
|
|
|
|
mkdir -p $(TARGET_CSS_DIR)
|
|
|
|
sassc --style compressed $(SOURCE_SASS_FILE) > $(TARGET_CSS_FILE)
|
|
|
|
sassc --style compressed $(SOURCE_SASS_FILE) > $(TARGET_CSS_FILE)
|
|
|
|
|
|
|
|
|
|
|
|
$(LIVE_CSS_FILE): $(SOURCE_SASS_FILE)
|
|
|
|
$(TARGET_ASSETS_IMG_DIR): $(SOURCE_ASSETS_IMG_FILES)
|
|
|
|
mkdir -p $(LIVE_CSS_DIR)
|
|
|
|
mkdir -p $(TARGET_ASSETS_IMG_DIR)
|
|
|
|
sassc $(SOURCE_SASS_FILE) > $(LIVE_CSS_FILE)
|
|
|
|
cp $(SOURCE_ASSETS_IMG_DIR)/* $(TARGET_ASSETS_IMG_DIR)
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: compile-debug
|
|
|
|
.PHONY: compile-debug
|
|
|
|
compile-debug:
|
|
|
|
compile-debug:
|
|
|
@ -44,6 +45,6 @@ elm-live:
|
|
|
|
--debug \
|
|
|
|
--debug \
|
|
|
|
--output=compiled/js/app.js
|
|
|
|
--output=compiled/js/app.js
|
|
|
|
|
|
|
|
|
|
|
|
.PHONE: sass-live
|
|
|
|
.PHONY: assets-live
|
|
|
|
sass-live:
|
|
|
|
assets-live:
|
|
|
|
while sleep 1; do make -s $(LIVE_CSS_FILE); done
|
|
|
|
while sleep 1; do make -s $(TARGET_CSS_FILE); make -s $(TARGET_ASSETS_IMG_DIR); done
|
|
|
|