File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,4 +63,4 @@ typings/
6363# skip dist files
6464dist
6565package-lock.json
66- target / build.js
66+ target *
Original file line number Diff line number Diff line change 44 "description" : " my entry for the #js13k 2018" ,
55 "main" : " index.js" ,
66 "scripts" : {
7- "concat" : " ./scripts/concat.sh > target/build.js" ,
7+ "concat" : " ./scripts/concat.sh > dist/build.js" ,
8+ "clean" : " rm target.zip; rm -rf dist/; rm -rf target/; mkdir -p dist target" ,
9+ "minify" : " npx google-closure-compiler --compilation_level=ADVANCED_OPTIMIZATIONS --js=dist/build.js --js_output_file=dist/build.min.js" ,
10+ "gen" : " cp src/index.html target/index.html && cp dist/build.min.js target/b.js" ,
11+ "zip" : " cd target; zip -r ../target.zip .; cd ..; wc -c target.zip" ,
12+ "build" : " export NODE_ENV=production; npm run clean && npm run concat && npm run minify && npm run gen && npm run zip" ,
813 "watch" : " nodemon -e js,sh --watch src --watch scripts --exec npm run concat" ,
914 "liveserver" : " mkdir -p target; cd target; live-server --no-browser" ,
1015 "start" : " npm run watch & npm run liveserver"
2530 "devDependencies" : {
2631 "live-server" : " ^1.2.0" ,
2732 "nodemon" : " ^1.18.3"
33+ },
34+ "dependencies" : {
35+ "google-closure-compiler" : " ^20180805.0.0"
2836 }
2937}
Original file line number Diff line number Diff line change 1- < head >
2- < title > JS13K 2018 @agar3s</ title >
3- < style >
4- body {
5- background : # 333 ;
6- margin : 0 ;
7- padding : 0 ;
8- }
9- canvas {
10- }
11- # c {
12- background : # fff ;
13- }
14- # f {
15- font-family : monospace;
16- position : absolute;
17- bottom : 10px ;
18- left : 10px ;
19- font-size : 21px ;
20- color : # 993 ;
21- text-decoration : none;
22- }
23- # f : hover {
24- color : # 9aa ;
25- }
26- </ style >
27- </ head >
28- < body allowfullscreen >
29- < div id ="d ">
30- < canvas id ="c " width ="320 " height ="240 "> </ canvas >
31- </ div >
32- < a href ='# ' id ='f ' title ='fullscreen '> FullScreen</ a >
33- < script src ="../dist/build.js "> </ script >
34- </ body >
1+ < head > < title > JS13K 2018 @agar3s</ title > < style > body {background : # 333 ;margin : 0 ;padding : 0 ;}# c {background : # fff ;}# f {font-family : monospace;position : absolute;bottom : 10px ;left : 10px ;font-size : 21px ;color : # 993 ;text-decoration : none;}# f : hover {color : # 9aa ;}</ style > </ head > < body allowfullscreen > < div id ="d "> < canvas id ="c " width ="320 " height ="240 "> </ canvas > </ div > < a href ='# ' id ='f ' title ='fullscreen '> FullScreen</ a > < script src ="b.js "> </ script > </ body >
Original file line number Diff line number Diff line change @@ -10,4 +10,4 @@ function Sprite() {
1010 }
1111}
1212
13- var player = new Sprite ( ) ;
13+ var player = Sprite ( ) ;
You can’t perform that action at this time.
0 commit comments