-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ninja
38 lines (27 loc) · 1.46 KB
/
build.ninja
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
rule copy
command = cp -rT $in $out
rule jsmin
command = npx webpack --mode production -o $out --entry ./$in --silent
rule cssmin
command = npx cssnano $in $out
rule svgrender
command = inkscape -z -e $out $in -w $$(basename -s .png $out) -h $$(basename -s .png $out) >/dev/null && optipng -o7 $out -silent
rule zip
command = rm -f $out && bsdtar cvf $out --strip-components 1 -a $in 2>/dev/null
rule git-archive
command = git archive --format=zip -o $out master
build dist/manifest.json: copy src/manifest.json
build dist/icons/16.png: svgrender src/icon.svg
build dist/icons/24.png: svgrender src/icon.svg
build dist/icons/32.png: svgrender src/icon.svg
build dist/icons/48.png: svgrender src/icon.svg
build dist/icons/64.png: svgrender src/icon.svg
build dist/icons/96.png: svgrender src/icon.svg
build dist/icons/128.png: svgrender src/icon.svg
build dist/icons/256.png: svgrender src/icon.svg
build dist/creeptd-stats.js: jsmin src/creeptd-stats.js | src/utils.js src/i18n.js
build dist/inject.js: jsmin src/inject.js
build dist/style.css: cssmin src/style.css
build dist/_locales: copy src/_locales | src/_locales/en/messages.json
build creeptd-stats.zip: zip dist/manifest.json dist/creeptd-stats.js dist/inject.js dist/style.css dist/icons/16.png dist/icons/24.png dist/icons/32.png dist/icons/48.png dist/icons/64.png dist/icons/96.png dist/icons/128.png dist/icons/256.png dist/_locales
build creeptd-stats-src.zip: git-archive creeptd-stats.zip