2014-12-17 16:21:25 +00:00
|
|
|
BROWSERIFY = browserify
|
|
|
|
GLOBAL_FLAGS = -e
|
|
|
|
OUTPUT_DIR = .
|
2015-01-28 14:35:22 +00:00
|
|
|
DEPLOY_DIR = libs
|
2014-12-17 16:21:25 +00:00
|
|
|
|
2015-01-22 15:36:12 +00:00
|
|
|
all: compile deploy clean
|
2014-12-17 16:21:25 +00:00
|
|
|
|
2015-01-22 15:36:12 +00:00
|
|
|
compile:FLAGS = $(GLOBAL_FLAGS)
|
2015-01-28 14:35:22 +00:00
|
|
|
compile: app
|
2015-01-22 15:36:12 +00:00
|
|
|
|
|
|
|
debug: compile-debug deploy clean
|
|
|
|
|
|
|
|
compile-debug:FLAGS = -d $(GLOBAL_FLAGS)
|
2015-01-28 14:35:22 +00:00
|
|
|
compile-debug: app
|
2014-12-17 16:21:25 +00:00
|
|
|
|
2015-01-28 14:35:22 +00:00
|
|
|
app:
|
|
|
|
$(BROWSERIFY) $(FLAGS) app.js -s APP -o $(OUTPUT_DIR)/app.bundle.js
|
2014-12-17 16:21:25 +00:00
|
|
|
|
|
|
|
clean:
|
2015-01-05 14:41:38 +00:00
|
|
|
@rm -f $(OUTPUT_DIR)/*.bundle.js
|
2014-12-17 16:21:25 +00:00
|
|
|
|
|
|
|
deploy:
|
|
|
|
@mkdir -p $(DEPLOY_DIR) && cp $(OUTPUT_DIR)/*.bundle.js $(DEPLOY_DIR)
|