From 6b3f0ad04550060fd25b87b68c3f9bc1602f3226 Mon Sep 17 00:00:00 2001 From: jloup Date: Thu, 1 Mar 2018 10:05:11 +0100 Subject: Use for currency display. --- cmd/web/Makefile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'cmd/web/Makefile') diff --git a/cmd/web/Makefile b/cmd/web/Makefile index c0ec4cd..c6bc2bd 100644 --- a/cmd/web/Makefile +++ b/cmd/web/Makefile @@ -6,18 +6,22 @@ SRC_DIR=js BUILD_DIR=build/js JSX_SRC= main.jsx signup.jsx signin.jsx otp.jsx poloniex.jsx JS_SRC= cookies.js app.js api.js -STATIC_FILES= index.html style.css cryptocoins.css cryptocoins.ttf cryptocoins.woff cryptocoins.woff2 +STATIC_FILES= index.html style.css JSX_OBJS=$(addprefix $(BUILD_DIR)/,$(JSX_SRC:.jsx=.js)) JS_OBJS=$(addprefix $(BUILD_DIR)/,$(JS_SRC)) +ICONS=$(addprefix $(STATIC_BUILD_DIR)/icons/black/, $(notdir $(wildcard static/icons/black/*.svg))) +ICONS+=$(addprefix $(STATIC_BUILD_DIR)/icons/color/, $(notdir $(wildcard static/icons/color/*.svg))) STATIC_BUILD_DIR=build/static +$(info $(ICONS)) + install: node --version npm --version yarn --version yarn install -static: $(STATIC_BUILD_DIR) js $(addprefix $(STATIC_BUILD_DIR)/, $(STATIC_FILES)) +static: $(STATIC_BUILD_DIR) js $(addprefix $(STATIC_BUILD_DIR)/, $(STATIC_FILES)) $(ICONS) js: build/static/main.js @@ -27,6 +31,8 @@ $(STATIC_BUILD_DIR)/%: static/% $(STATIC_BUILD_DIR): mkdir -p $(BUILD_DIR) mkdir -p $@ + mkdir -p $@/icons/black + mkdir -p $@/icons/color $(BUILD_DIR)/%.js: $(SRC_DIR)/%.jsx eslint --fix $< @@ -36,14 +42,17 @@ $(BUILD_DIR)/%.js: $(SRC_DIR)/%.js eslint $< cp $< $@ +$(STATIC_BUILD_DIR)/icons/black/%.svg: static/icons/black/%.svg + cp $< $@ + build/static/main.js: $(JSX_OBJS) $(JS_OBJS) env/$(ENV).env browserify -t [ babelify --presets [ env react ] --plugins [ transform-class-properties ] ] \ -t [ localenvify --envfile env/$(ENV).env ] \ -t [ debowerify ] \ $(BUILD_DIR)/main.js -o $@ -build/webapp.tar.gz: $(addprefix $(STATIC_BUILD_DIR)/, $(STATIC_FILES)) build/static/main.js - tar czf $@ --directory=$(dir $<) $(notdir $^) +build/webapp.tar.gz: $(addprefix $(STATIC_BUILD_DIR)/, $(STATIC_FILES)) build/static/main.js $(ICONS) + tar czf $@ --directory=$(dir $<) $(subst $(STATIC_BUILD_DIR)/,,$^) release: $(STATIC_BUILD_DIR) build/webapp.tar.gz -- cgit v1.2.3