"make prod" to build generated css/js files

pull/186/head
Francis Lachapelle 2015-12-18 14:08:34 -05:00
parent f778031176
commit 2628b0e79a
1 changed files with 12 additions and 0 deletions

View File

@ -3,6 +3,9 @@
include ../common.make
WEBSERVER_RESOURCE_DIRS = css fonts img js
JS_FILES = js/Administration.* js/Common.* js/Contacts.* js/Mailer.* js/Main.* js/Preferences.* js/Scheduler.* css/styles.*
JS_LIB_FILES = js/vendor/angular-animate.* js/vendor/angular-aria.* js/vendor/angular-file-upload.min.js js/vendor/angular-material.* js/vendor/angular-sanitize.* js/vendor/angular-ui-router.* js/vendor/angular.* js/vendor/lodash.*
CSS_FILES = css/styles.css css/styles.css.map
.DEFAULT_GOAL := all
@ -19,6 +22,15 @@ dev:
fi
grunt --stack build
prod:
git stash
grunt --stack build
git update-index --no-assume-unchanged $(CSS_FILES) $(JS_FILES) $(JS_LIB_FILES)
git add -f $(CSS_FILES) $(JS_FILES) $(JS_LIB_FILES)
git commit -m "(js/css) Update generated files"
git update-index --assume-unchanged $(CSS_FILES) $(JS_FILES) $(JS_LIB_FILES)
git stash pop
all:
@echo "The 'all' target does nothing. Use 'make dev' to generate static files and 'make install' to install them."