diff options
author | jloup <jeanloup.jamet@gmail.com> | 2018-03-01 10:05:11 +0100 |
---|---|---|
committer | jloup <jeanloup.jamet@gmail.com> | 2018-03-01 10:05:11 +0100 |
commit | 6b3f0ad04550060fd25b87b68c3f9bc1602f3226 (patch) | |
tree | 32a926d55f5f9dacafe87e1b4f9d9ae96e86aeab /cmd/web/Makefile | |
parent | b2e9bce00231489ef507927eceb9207285cd2fe4 (diff) | |
download | Front-6b3f0ad04550060fd25b87b68c3f9bc1602f3226.tar.gz Front-6b3f0ad04550060fd25b87b68c3f9bc1602f3226.tar.zst Front-6b3f0ad04550060fd25b87b68c3f9bc1602f3226.zip |
Use <img> for currency display.
Diffstat (limited to 'cmd/web/Makefile')
-rw-r--r-- | cmd/web/Makefile | 17 |
1 files changed, 13 insertions, 4 deletions
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 | |||
6 | BUILD_DIR=build/js | 6 | BUILD_DIR=build/js |
7 | JSX_SRC= main.jsx signup.jsx signin.jsx otp.jsx poloniex.jsx | 7 | JSX_SRC= main.jsx signup.jsx signin.jsx otp.jsx poloniex.jsx |
8 | JS_SRC= cookies.js app.js api.js | 8 | JS_SRC= cookies.js app.js api.js |
9 | STATIC_FILES= index.html style.css cryptocoins.css cryptocoins.ttf cryptocoins.woff cryptocoins.woff2 | 9 | STATIC_FILES= index.html style.css |
10 | JSX_OBJS=$(addprefix $(BUILD_DIR)/,$(JSX_SRC:.jsx=.js)) | 10 | JSX_OBJS=$(addprefix $(BUILD_DIR)/,$(JSX_SRC:.jsx=.js)) |
11 | JS_OBJS=$(addprefix $(BUILD_DIR)/,$(JS_SRC)) | 11 | JS_OBJS=$(addprefix $(BUILD_DIR)/,$(JS_SRC)) |
12 | ICONS=$(addprefix $(STATIC_BUILD_DIR)/icons/black/, $(notdir $(wildcard static/icons/black/*.svg))) | ||
13 | ICONS+=$(addprefix $(STATIC_BUILD_DIR)/icons/color/, $(notdir $(wildcard static/icons/color/*.svg))) | ||
12 | STATIC_BUILD_DIR=build/static | 14 | STATIC_BUILD_DIR=build/static |
13 | 15 | ||
16 | $(info $(ICONS)) | ||
17 | |||
14 | install: | 18 | install: |
15 | node --version | 19 | node --version |
16 | npm --version | 20 | npm --version |
17 | yarn --version | 21 | yarn --version |
18 | yarn install | 22 | yarn install |
19 | 23 | ||
20 | static: $(STATIC_BUILD_DIR) js $(addprefix $(STATIC_BUILD_DIR)/, $(STATIC_FILES)) | 24 | static: $(STATIC_BUILD_DIR) js $(addprefix $(STATIC_BUILD_DIR)/, $(STATIC_FILES)) $(ICONS) |
21 | 25 | ||
22 | js: build/static/main.js | 26 | js: build/static/main.js |
23 | 27 | ||
@@ -27,6 +31,8 @@ $(STATIC_BUILD_DIR)/%: static/% | |||
27 | $(STATIC_BUILD_DIR): | 31 | $(STATIC_BUILD_DIR): |
28 | mkdir -p $(BUILD_DIR) | 32 | mkdir -p $(BUILD_DIR) |
29 | mkdir -p $@ | 33 | mkdir -p $@ |
34 | mkdir -p $@/icons/black | ||
35 | mkdir -p $@/icons/color | ||
30 | 36 | ||
31 | $(BUILD_DIR)/%.js: $(SRC_DIR)/%.jsx | 37 | $(BUILD_DIR)/%.js: $(SRC_DIR)/%.jsx |
32 | eslint --fix $< | 38 | eslint --fix $< |
@@ -36,14 +42,17 @@ $(BUILD_DIR)/%.js: $(SRC_DIR)/%.js | |||
36 | eslint $< | 42 | eslint $< |
37 | cp $< $@ | 43 | cp $< $@ |
38 | 44 | ||
45 | $(STATIC_BUILD_DIR)/icons/black/%.svg: static/icons/black/%.svg | ||
46 | cp $< $@ | ||
47 | |||
39 | build/static/main.js: $(JSX_OBJS) $(JS_OBJS) env/$(ENV).env | 48 | build/static/main.js: $(JSX_OBJS) $(JS_OBJS) env/$(ENV).env |
40 | browserify -t [ babelify --presets [ env react ] --plugins [ transform-class-properties ] ] \ | 49 | browserify -t [ babelify --presets [ env react ] --plugins [ transform-class-properties ] ] \ |
41 | -t [ localenvify --envfile env/$(ENV).env ] \ | 50 | -t [ localenvify --envfile env/$(ENV).env ] \ |
42 | -t [ debowerify ] \ | 51 | -t [ debowerify ] \ |
43 | $(BUILD_DIR)/main.js -o $@ | 52 | $(BUILD_DIR)/main.js -o $@ |
44 | 53 | ||
45 | build/webapp.tar.gz: $(addprefix $(STATIC_BUILD_DIR)/, $(STATIC_FILES)) build/static/main.js | 54 | build/webapp.tar.gz: $(addprefix $(STATIC_BUILD_DIR)/, $(STATIC_FILES)) build/static/main.js $(ICONS) |
46 | tar czf $@ --directory=$(dir $<) $(notdir $^) | 55 | tar czf $@ --directory=$(dir $<) $(subst $(STATIC_BUILD_DIR)/,,$^) |
47 | 56 | ||
48 | release: $(STATIC_BUILD_DIR) build/webapp.tar.gz | 57 | release: $(STATIC_BUILD_DIR) build/webapp.tar.gz |
49 | 58 | ||