forked from mozilla/fireplace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (48 loc) · 1.47 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
VERSION = `date "+%Y.%m.%d_%H.%M.%S"`
TEMPLATES = $(wildcard \
hearth/templates/*.html \
public/templates/**/*.html \
)
STYL_FILES = $(wildcard \
hearth/media/css/*.styl \
public/media/css/**/*.styl \
)
CSS_FILES = $(STYL_FILES:.styl=.styl.css)
COMPILED_TEMPLATES = hearth/templates.js
compile: $(COMPILED_TEMPLATES) $(CSS_FILES)
fastcompile:
node damper.js --compile
$(COMPILED_TEMPLATES): $(TEMPLATES)
node damper.js --compile nunjucks
%.styl.css: %.styl
node damper.js --compile stylus --path $<
l10n: compile
cd locale ; \
./omg_new_l10n.sh
langpacks:
for po in `find locale -name "*.po"` ; do \
node scripts/generate_langpacks.js $$po ; \
mv $$po.js hearth/locales/`basename \`dirname \\\`dirname $$po\\\`\` | tr "_" "-"`.js ; \
done
test: clean compile
cd smokealarm ; \
casperjs test tests
package: compile
cd hearth/ && zip -r ../$(VERSION).zip * && cd ../
log:
cd yulelog && zip -r ../yulelog_$(VERSION).zip * && cd ../
clean:
rm -f $(CSS_FILES)
rm -f hearth/media/css/include.css
rm -f hearth/media/include.*
includes: compile
echo "/* $(VERSION) */" > hearth/media/include.css
echo "/* $(VERSION) */" > hearth/media/include.js
cat yulelog/amd.js >> hearth/media/include.js
python build.py
cat hearth/media/include.css | cleancss > hearth/media/css/include.css
rm hearth/media/include.css
uglifyjs hearth/media/include.js -o hearth/media/include.js -m
lint:
# You need closure-linter installed for this.
gjslint --nojsdoc -r hearth/media/js/ -e lib