Skip to content

Instantly share code, notes, and snippets.

@aslakhellesoy
Last active August 29, 2015 13:56
Show Gist options
  • Save aslakhellesoy/9070169 to your computer and use it in GitHub Desktop.
Save aslakhellesoy/9070169 to your computer and use it in GitHub Desktop.
How to concatenate and minify js with make
BIN = node_modules/.bin
# Combine, ngmin and minify all of our own scripts
public/app.js: \
ng-app/providers/providers.js \
ng-app/providers/*.js \
ng-app/cucumber_pro.js \
ng-app/**/*.js
ifdef DEBUG
cat $^ | \
$(BIN)/ngmin > $@
else
cat $^ | \
$(BIN)/ngmin | \
$(BIN)/uglifyjs --output $@
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment