3 export PATH := $(PATH):./node_modules/.bin
7 JSX_SRC= main.jsx signup.jsx signin.jsx otp.jsx poloniex.jsx
8 JS_SRC= cookies.js app.js api.js
9 STATIC_FILES= index.html style.css cryptocoins.css cryptocoins.ttf cryptocoins.woff cryptocoins.woff2
10 JSX_OBJS=$(addprefix $(BUILD_DIR)/,$(JSX_SRC:.jsx=.js))
11 JS_OBJS=$(addprefix $(BUILD_DIR)/,$(JS_SRC))
12 STATIC_BUILD_DIR=build/static
20 static: $(STATIC_BUILD_DIR) js $(addprefix $(STATIC_BUILD_DIR)/, $(STATIC_FILES))
22 js: build/static/main.js
24 $(STATIC_BUILD_DIR)/%: static/%
31 $(BUILD_DIR)/%.js: $(SRC_DIR)/%.jsx
35 $(BUILD_DIR)/%.js: $(SRC_DIR)/%.js
39 build/static/main.js: $(JSX_OBJS) $(JS_OBJS) env/$(ENV).env
40 browserify -t [ babelify --presets [ env react ] --plugins [ transform-class-properties ] ] \
41 -t [ localenvify --envfile env/$(ENV).env ] \
43 $(BUILD_DIR)/main.js -o $@
45 build/webapp.tar.gz: $(addprefix $(STATIC_BUILD_DIR)/, $(STATIC_FILES)) build/static/main.js
46 tar czf $@ --directory=$(dir $<) $(notdir $^)
48 release: $(STATIC_BUILD_DIR) build/webapp.tar.gz