2015-03-09 17:41:17 +01:00
|
|
|
NPM = npm
|
2014-12-17 18:21:25 +02:00
|
|
|
BROWSERIFY = browserify
|
2015-02-06 17:46:50 +02:00
|
|
|
GLOBAL_FLAGS = -x jquery -e
|
2014-12-17 18:21:25 +02:00
|
|
|
OUTPUT_DIR = .
|
2015-01-28 16:35:22 +02:00
|
|
|
DEPLOY_DIR = libs
|
2014-12-17 18:21:25 +02:00
|
|
|
|
2015-01-22 17:36:12 +02:00
|
|
|
all: compile deploy clean
|
2014-12-17 18:21:25 +02:00
|
|
|
|
2015-01-22 17:36:12 +02:00
|
|
|
compile:FLAGS = $(GLOBAL_FLAGS)
|
2015-01-28 16:35:22 +02:00
|
|
|
compile: app
|
2015-01-22 17:36:12 +02:00
|
|
|
|
|
|
|
|
debug: compile-debug deploy clean
|
|
|
|
|
|
|
|
|
|
compile-debug:FLAGS = -d $(GLOBAL_FLAGS)
|
2015-01-28 16:35:22 +02:00
|
|
|
compile-debug: app
|
2014-12-17 18:21:25 +02:00
|
|
|
|
2015-01-28 16:35:22 +02:00
|
|
|
app:
|
2015-03-09 17:41:17 +01:00
|
|
|
$(NPM) update && $(BROWSERIFY) $(FLAGS) app.js -s APP -o $(OUTPUT_DIR)/app.bundle.js
|
2014-12-17 18:21:25 +02:00
|
|
|
|
|
|
|
|
clean:
|
2015-01-05 16:41:38 +02:00
|
|
|
@rm -f $(OUTPUT_DIR)/*.bundle.js
|
2014-12-17 18:21:25 +02:00
|
|
|
|
|
|
|
|
deploy:
|
2015-03-21 19:55:48 -07:00
|
|
|
@mkdir -p $(DEPLOY_DIR) && cp $(OUTPUT_DIR)/*.bundle.js $(DEPLOY_DIR) && ./bump-js-versions.sh
|