Projekt

Obecné

Profil

Stáhnout (748 Bajtů) Statistiky
| Větev: | Revize:
1 10e26305 Anděl Ondřej
ifeq ($(OS),Windows_NT)
2
    OPEN := start
3
else
4
    UNAME := $(shell uname -s)
5
    ifeq ($(UNAME),Linux)
6
        OPEN := xdg-open
7
    endif
8
    ifeq ($(UNAME),Darwin)
9
        OPEN := open
10
    endif
11
endif
12
13
COMPILER := $(shell command -v closure-compiler 2> /dev/null)
14
15
.PHONY: demo test dist
16
17
demo:
18
	$(OPEN) demo/index.html
19
20
test:
21
	$(OPEN) test/SpecRunner.html
22
23
SOURCE := src/jquery.multi-select.js
24
DEST := src/jquery.multi-select.min.js
25
26
dist:
27
ifndef COMPILER
28
	$(error "closure-compiler is not available, please install it")
29
endif
30
	@echo "Before"
31
	wc -c $(DEST) && gzip -c $(DEST) | wc -c
32
	$(COMPILER) --externs externs/jquery-1.9.js -O ADVANCED --rewrite_polyfills=false $(SOURCE) > $(DEST)
33
	@echo "After"
34
	wc -c $(DEST) && gzip -c $(DEST) | wc -c