minify javascript
This commit is contained in:
parent
8a2a0a3a75
commit
3154f6b154
21
js/Makefile
21
js/Makefile
@ -6,10 +6,11 @@ MAPS+=$(wildcard ../maps/contest?.map ../maps/contest10.map)
|
||||
MAPS+=$(wildcard ../maps/ems*.map)
|
||||
MAPS+=../maps/pacman.map ../maps/pacman2.map
|
||||
|
||||
all: maps.js sprites.png
|
||||
all: maps.js sprites.png gui.min.js mine.min.js maps.min.js
|
||||
|
||||
maps.js: mapsToJson.js $(MAPS)
|
||||
./mapsToJson.js $(MAPS) > maps.js
|
||||
maps.js: FORCE
|
||||
./mapsToJson.js $(MAPS) > maps.js.new
|
||||
@if test ! -e maps.js || ! diff maps.js maps.js.new > /dev/null; then echo "new maps"; mv maps.js.new maps.js; else rm maps.js.new; fi
|
||||
|
||||
SPRITES=earth.png empty.png lambda.png liftclosed.png liftopen.png robot.png rock.png wall.png
|
||||
SPRITES+=$(wildcard trampoline?.png)
|
||||
@ -22,10 +23,16 @@ sprites.png: $(SPRITES)
|
||||
optipng -o9 tmp_sprites1.png
|
||||
mv tmp_sprites1.png sprites.png
|
||||
|
||||
gui.min.js: gui.js
|
||||
yui-compressor --type js --charset utf-8 -o $@ $<
|
||||
|
||||
mine.min.js: mine.js
|
||||
yui-compressor --type js --charset utf-8 -o $@ $<
|
||||
|
||||
maps.min.js: maps.js
|
||||
yui-compressor --type js --charset utf-8 -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f maps.js sprites.png
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
# just build it everytime
|
||||
.PHONY: maps.js
|
||||
.PHONY: all clean FORCE
|
||||
|
1
js/gui.min.js
vendored
Normal file
1
js/gui.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
||||
<html><head>
|
||||
<script type="text/javascript" src="maps.js"></script>
|
||||
<script type="text/javascript" src="mine.js"></script>
|
||||
<script type="text/javascript" src="gui.js"></script>
|
||||
<script type="text/javascript" src="maps.min.js"></script>
|
||||
<script type="text/javascript" src="mine.min.js"></script>
|
||||
<script type="text/javascript" src="gui.min.js"></script>
|
||||
<title>ICFP Contest 2012 Simulator</title>
|
||||
</head><body>
|
||||
<h2>ICFP Contest 2012 Simulator</h2>
|
||||
|
1
js/maps.min.js
vendored
Normal file
1
js/maps.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
js/mine.min.js
vendored
Normal file
1
js/mine.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user