2014-12-17 16:21:25 +00:00
|
|
|
BROWSERIFY = browserify
|
|
|
|
GLOBAL_FLAGS = -e
|
|
|
|
MODULE_DIR = modules
|
|
|
|
MODULE_SUBDIRS = $(wildcard $(MODULE_DIR)/*/)
|
|
|
|
MODULES = $(MODULE_SUBDIRS:$(MODULE_DIR)/%/=%)
|
|
|
|
OUTPUT_DIR = .
|
|
|
|
DEPLOY_DIR = libs/modules
|
|
|
|
|
|
|
|
all:FLAGS = $(GLOBAL_FLAGS)
|
|
|
|
all:$(MODULES)
|
|
|
|
|
|
|
|
debug:FLAGS = -d $(GLOBAL_FLAGS)
|
|
|
|
debug:$(MODULES)
|
|
|
|
|
|
|
|
$(MODULES): *.js
|
|
|
|
$(BROWSERIFY) $(FLAGS) $(MODULE_DIR)/$@/$@.js -s $@ -o $(OUTPUT_DIR)/$@.bundle.js
|
|
|
|
|
|
|
|
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)
|
2015-01-07 14:54:03 +00:00
|
|
|
|