forked from AudithSoftworks/Uniform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
89 lines (67 loc) · 3.15 KB
/
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
JS_MIN = jquery.uniform.min.js
THEME_CSS = $(patsubst %.scss, %.css, $(wildcard themes/*/css/*.scss))
THEME_CSS_MIN = $(patsubst %.css, %.min.css, $(THEME_CSS))
WWW_TARGETS = www/index.html www/stylesheets/multiple-themes.css
WWW_TARGETS += www/javascripts/jquery.uniform.js
WWW_TARGETS += www/javascripts/jquery.uniform.min.js
ZIP_THEME_TARGETS = www/downloads/uniform.agent.theme.zip
ZIP_THEME_TARGETS += www/downloads/uniform.aristo.theme.zip
ZIP_THEME_TARGETS += www/downloads/uniform.default.theme.zip
ZIP_THEME_TARGETS += www/downloads/uniform.jeans.theme.zip
WWW_TARGETS += $(ZIP_THEME_TARGETS)
CSS_THEME_TARGETS = www/stylesheets/uniform.agent.css
CSS_THEME_TARGETS += www/stylesheets/uniform.aristo.css
CSS_THEME_TARGETS += www/stylesheets/uniform.default.css
CSS_THEME_TARGETS += www/stylesheets/uniform.jeans.css
WWW_TARGETS += $(CSS_THEME_TARGETS)
WWW_TARGETS += www/downloads/theme-kit.zip
.PHONY: all clean
all: jquery.uniform.min.js $(JS_MIN) $(THEME_CSS) $(THEME_CSS_MIN) $(WWW_TARGETS)
www: www/javascripts/jquery.uniform.js www/javascripts/jquery.uniform.min.js $(WWW_TARGETS)
clean:
rm -f jquery.uniform.min.js $(WWW_TARGETS) $(THEME_CSS) $(THEME_CSS_MIN)
%.min.js: %.js
node_modules/.bin/uglifyjs jquery.uniform.js -o jquery.uniform.min.js -m -c
%.css: %.scss themes/_base/css/uniform._base.scss
sass --load-path themes/_base/css --scss -s < $< > $@
%.min.css: %.scss themes/_base/css/uniform._base.scss
sass --load-path themes/_base/css --scss -s --style=compressed < $< > $@
%.html: %.md
node_modules/.bin/marked --gfm -i $< -o $@
www/downloads/theme-kit.zip: $(wildcard theme-kit/*) theme-kit/README.html
rm -f $@
( cd theme-kit; zip -r9 ../$@ * )
www/downloads/uniform.agent.theme.zip: $(wildcard themes/agent/*/*)
rm -f $@
( cd themes/agent; zip -r9 ../../$@ * )
cp themes/agent/images/*.png www/images/
www/downloads/uniform.aristo.theme.zip: $(wildcard themes/aristo/*/*)
rm -f $@
( cd themes/aristo; zip -r9 ../../$@ * )
cp themes/aristo/images/*.png www/images/
www/downloads/uniform.default.theme.zip: $(wildcard themes/default/*/*)
rm -f $@
( cd themes/default; zip -r9 ../../$@ * )
cp themes/default/images/*.png www/images/
www/downloads/uniform.jeans.theme.zip: $(wildcard themes/jeans/*/*)
rm -f $@
( cd themes/jeans; zip -r9 ../../$@ * )
cp themes/jeans/images/*.png www/images/
www/index.html: $(wildcard www-fragments/index-*) README.md
cp www-fragments/index-start.html $@
node_modules/.bin/marked --gfm -i README.md >> $@
cat www-fragments/index-stop.html >> $@
www/javascripts/jquery.uniform.js: jquery.uniform.js
cp jquery.uniform.js www/javascripts
www/javascripts/jquery.uniform.min.js: jquery.uniform.min.js
cp jquery.uniform.min.js www/javascripts
www/stylesheets/multiple-themes.css: www/stylesheets/multiple-themes.scss $(wildcard themes/*/css/*.scss)
sass --load-path www/stylesheets --scss -s < $< > $@
www/stylesheets/uniform.agent.css: themes/agent/css/uniform.agent.css
cp $< $@
www/stylesheets/uniform.aristo.css: themes/aristo/css/uniform.aristo.css
cp $< $@
www/stylesheets/uniform.default.css: themes/default/css/uniform.default.css
cp $< $@
www/stylesheets/uniform.jeans.css: themes/jeans/css/uniform.jeans.css
cp $< $@