forked from ftlabs/fastclick
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
24 lines (18 loc) · 749 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
SHELL := /bin/bash
QS=compilation_level=SIMPLE_OPTIMIZATIONS&output_format=text
URL=https://closure-compiler.appspot.com/compile
CODE=js_code@lib/fastclick.js
CHECK=\033[32m✔\033[39m
build/fastclick.min.js: lib/fastclick.js
@mkdir -p build
@echo -n "Building build/fastclick.min.js... "
@curl --silent --show-error --data-urlencode "${CODE}" --data "${QS}&output_info=compiled_code" ${URL} -o build/fastclick.min.js
@echo -e "${CHECK} Done"
@echo -n "Getting compression stats... "
@echo -e "${CHECK} Done\n\n" "`curl --silent --show-error --data-urlencode "${CODE}" --data "${QS}&output_info=statistics" ${URL}`"
@echo ${STATS}
test:
jshint -v lib/*.js
clean:
rm -rf build
.PHONY: clean test