Skip to content

Commit 3d1b0f3

Browse files
committed
moving sprites.json, prettifying pug output
1 parent c55b3be commit 3d1b0f3

File tree

8 files changed

+383
-171
lines changed

8 files changed

+383
-171
lines changed

docs/assets/js/scripts.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/js/sprites.json

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
[
2+
{
3+
"name" : "Berry of Wild Grape",
4+
"url" : "assets/images/berryofwildgrape.png",
5+
"x-pos" : "160",
6+
"y-pos" : "240"
7+
},
8+
{
9+
"name" : "Cake",
10+
"url" : "assets/images/cake.png",
11+
"x-pos" : "145",
12+
"y-pos" : "250"
13+
},
14+
{
15+
"name" : "Chicken",
16+
"url" : "assets/images/chicken.png",
17+
"x-pos" : "150",
18+
"y-pos" : "235"
19+
},
20+
{
21+
"name" : "Chicken Statue",
22+
"url" : "assets/images/chicken-statue.png",
23+
"x-pos" : "150",
24+
"y-pos" : "235"
25+
},
26+
{
27+
"name" : "Corn",
28+
"url" : "assets/images/corn.png",
29+
"x-pos" : "155",
30+
"y-pos" : "245"
31+
},
32+
{
33+
"name" : "Croissant",
34+
"url" : "assets/images/croissant.png",
35+
"x-pos" : "140",
36+
"y-pos" : "250"
37+
},
38+
{
39+
"name" : "Dumpling",
40+
"url" : "assets/images/dumpling.png",
41+
"x-pos" : "155",
42+
"y-pos" : "250"
43+
},
44+
{
45+
"name" : "Egg",
46+
"url" : "assets/images/egg.png",
47+
"x-pos" : "180",
48+
"y-pos" : "245"
49+
},
50+
{
51+
"name" : "Egg Broken",
52+
"url" : "assets/images/egg-broken.png",
53+
"x-pos" : "145",
54+
"y-pos" : "245"
55+
},
56+
{
57+
"name" : "Elf",
58+
"url" : "assets/images/elf.png",
59+
"x-pos" : "170",
60+
"y-pos" : "230"
61+
},
62+
{
63+
"name" : "Fancy Flower",
64+
"url" : "assets/images/fancyflower.png",
65+
"x-pos" : "145",
66+
"y-pos" : "230"
67+
},
68+
{
69+
"name" : "Fish",
70+
"url" : "assets/images/fish.png",
71+
"x-pos" : "160",
72+
"y-pos" : "260"
73+
},
74+
{
75+
"name" : "Flower",
76+
"url" : "assets/images/flower.png",
77+
"x-pos" : "150",
78+
"y-pos" : "250"
79+
},
80+
{
81+
"name" : "Hay",
82+
"url" : "assets/images/hay.png",
83+
"x-pos" : "140",
84+
"y-pos" : "250"
85+
},
86+
{
87+
"name" : "Herb",
88+
"url" : "assets/images/herb.png",
89+
"x-pos" : "165",
90+
"y-pos" : "240"
91+
},
92+
{
93+
"name" : "Milk Large",
94+
"url" : "assets/images/milk-large.png",
95+
"x-pos" : "145",
96+
"y-pos" : "225"
97+
},
98+
{
99+
"name" : "Milk Small",
100+
"url" : "assets/images/milk-small.png",
101+
"x-pos" : "155",
102+
"y-pos" : "240"
103+
},
104+
{
105+
"name" : "Mole",
106+
"url" : "assets/images/mole.png",
107+
"x-pos" : "150",
108+
"y-pos" : "240"
109+
},
110+
{
111+
"name" : "Potato",
112+
"url" : "assets/images/potato.png",
113+
"x-pos" : "160",
114+
"y-pos" : "245"
115+
},
116+
{
117+
"name" : "Potato Broken",
118+
"url" : "assets/images/potato-broken.png",
119+
"x-pos" : "145",
120+
"y-pos" : "235"
121+
},
122+
{
123+
"name" : "Power Berry",
124+
"url" : "assets/images/powerberry.png",
125+
"x-pos" : "160",
126+
"y-pos" : "240"
127+
},
128+
{
129+
"name" : "Rice Cake",
130+
"url" : "assets/images/rice-cake.png",
131+
"x-pos" : "155",
132+
"y-pos" : "255"
133+
},
134+
{
135+
"name" : "Rock",
136+
"url" : "assets/images/rock.png",
137+
"x-pos" : "150",
138+
"y-pos" : "245"
139+
},
140+
{
141+
"name" : "Tomato",
142+
"url" : "assets/images/tomato.png",
143+
"x-pos" : "160",
144+
"y-pos" : "240"
145+
},
146+
{
147+
"name" : "Turnip",
148+
"url" : "assets/images/turnip.png",
149+
"x-pos" : "160",
150+
"y-pos" : "235"
151+
},
152+
{
153+
"name" : "Weed",
154+
"url" : "assets/images/weed.png",
155+
"x-pos" : "150",
156+
"y-pos" : "230"
157+
},
158+
{
159+
"name" : "Winter Flower",
160+
"url" : "assets/images/winterflower.png",
161+
"x-pos" : "145",
162+
"y-pos" : "225"
163+
}
164+
]

docs/index.html

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,45 @@
1-
<!DOCTYPE html><html lang="en"><head><title>Feed Jack HTML5 Canvas Application</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="assets/css/style.min.css"></head><body><div class="credit"><a href="http://www.seeyouspacecow.com" target="_blank">See You Space Cow</a></div><div class="container"><div class="canvas-container" id="js-canvas-container"><canvas class="canvas" id="js-canvas" height="500" width="500">Canvas is not supported by your browser</canvas></div><div class="selectors"><div><h1>Feed Jack!</h1><p>Use the dropdowns below to select a food item or change the background.</p><p>You can change to a different item during the animation or stop the animation altogether.</p></div><div><form id="js-food-form"><label>Select food</label><select id="js-food-select"></select><input class="btn-start" id="js-start" type="submit" value="Start Animation"><input id="js-stop" type="button" value="Stop Animation"></form><form class="background-form" id="js-background-form"><label>Change background</label><select id="js-background-select"><option value="assets/images/home_winter.png">Home (Winter)</option><option value="assets/images/home_bedroom.png">Bedroom</option><option value="assets/images/church.png">Church</option><option value="assets/images/cow-shed.png">Cow Shed</option><option value="assets/images/fishing-spot.png">Fishing Spot (Winter)</option><option value="assets/images/home_kitchen.png">Kitchen</option><option value="assets/images/town_bar.png">Town Bar (Winter)</option></select></form></div></div></div><script src="assets/js/scripts.min.js"></script></body></html>
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Feed Jack HTML5 Canvas Application</title>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<link rel="stylesheet" href="assets/css/style.min.css">
8+
</head>
9+
<body>
10+
<div class="credit"><a href="http://www.seeyouspacecow.com" target="_blank">See You Space Cow</a></div>
11+
<div class="container">
12+
<div class="canvas-container" id="js-canvas-container">
13+
<canvas class="canvas" id="js-canvas" height="500" width="500">Canvas is not supported by your browser</canvas>
14+
</div>
15+
<div class="selectors">
16+
<div>
17+
<h1>Feed Jack!</h1>
18+
<p>Use the dropdowns below to select a food item or change the background.</p>
19+
<p>You can change to a different item during the animation or stop the animation altogether.</p>
20+
</div>
21+
<div>
22+
<form id="js-food-form">
23+
<label>Select food</label>
24+
<select id="js-food-select"></select>
25+
<input class="btn-start" id="js-start" type="submit" value="Start Animation">
26+
<input id="js-stop" type="button" value="Stop Animation">
27+
</form>
28+
<form class="background-form" id="js-background-form">
29+
<label>Change background</label>
30+
<select id="js-background-select">
31+
<option value="assets/images/home_winter.png">Home (Winter)</option>
32+
<option value="assets/images/home_bedroom.png">Bedroom</option>
33+
<option value="assets/images/church.png">Church</option>
34+
<option value="assets/images/cow-shed.png">Cow Shed</option>
35+
<option value="assets/images/fishing-spot.png">Fishing Spot (Winter)</option>
36+
<option value="assets/images/home_kitchen.png">Kitchen</option>
37+
<option value="assets/images/town_bar.png">Town Bar (Winter)</option>
38+
</select>
39+
</form>
40+
</div>
41+
</div>
42+
</div>
43+
<script src="assets/js/scripts.min.js"></script>
44+
</body>
45+
</html>

gulp/tasks/html.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ const pug = require( 'gulp-pug' );
44

55
module.exports = () => {
66
return gulp.src( 'src/*.pug' )
7-
.pipe( pug() )
7+
.pipe( pug( {
8+
pretty: true
9+
} ) )
810
.pipe( gulp.dest( 'docs/' ) );
911
};

gulp/tasks/js.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ const eslint = require( 'gulp-eslint' ),
88
order = require( 'gulp-order' );
99

1010
module.exports = () => {
11+
12+
gulp.src( [ 'src/assets/js/sprites.json' ] )
13+
.pipe( gulp.dest( 'docs/assets/js' ) );
14+
1115
return gulp.src( 'src/assets/js/**' )
1216
.pipe( eslint() )
1317
.pipe( babel() )

0 commit comments

Comments
 (0)