Skip to content

Commit

Permalink
WIP: rewrite test, remove console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
smellman committed Dec 10, 2023
1 parent fe326a3 commit 82730d2
Show file tree
Hide file tree
Showing 17 changed files with 8 additions and 3,524 deletions.
4 changes: 0 additions & 4 deletions src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ export const generateSprite = async (
ratios: number[] = [1],
sdf: boolean = false,
): Promise<void> => {
if (sdf) {
console.log(`Generating sprite ${output_file_name}`)
console.log(`Input directories: ${input_directories}`)
}
const promises: Promise<void>[] = []
ratios.forEach((ratio) => {
promises.push(
Expand Down
27 changes: 1 addition & 26 deletions tests/fixtures/test2.json
Original file line number Diff line number Diff line change
@@ -1,26 +1 @@
{
"airport": {
"height": 36,
"width": 36,
"x": 0,
"y": 92,
"pixelRatio": 2,
"sdf": false
},
"airport_xl": {
"height": 92,
"width": 92,
"x": 0,
"y": 0,
"pixelRatio": 2,
"sdf": false
},
"my_bbq": {
"height": 70,
"width": 70,
"x": 92,
"y": 0,
"pixelRatio": 2,
"sdf": false
}
}
{"airport":{"height":36,"width":36,"x":0,"y":92,"pixelRatio":2,"sdf":false},"airport_xl":{"height":92,"width":92,"x":0,"y":0,"pixelRatio":2,"sdf":false},"my_bbq":{"height":70,"width":70,"x":92,"y":0,"pixelRatio":2,"sdf":false}}
Binary file modified tests/fixtures/test2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 1 addition & 26 deletions tests/fixtures/test3.json
Original file line number Diff line number Diff line change
@@ -1,26 +1 @@
{
"airport": {
"height": 21,
"width": 21,
"x": 0,
"y": 49,
"pixelRatio": 1,
"sdf": false
},
"my_bbq": {
"height": 38,
"width": 38,
"x": 49,
"y": 0,
"pixelRatio": 1,
"sdf": false
},
"airport_xl": {
"height": 49,
"width": 49,
"x": 0,
"y": 0,
"pixelRatio": 1,
"sdf": false
}
}
{"airport":{"height":21,"width":21,"x":0,"y":49,"pixelRatio":1,"sdf":false},"my_bbq":{"height":38,"width":38,"x":49,"y":0,"pixelRatio":1,"sdf":false},"airport_xl":{"height":49,"width":49,"x":0,"y":0,"pixelRatio":1,"sdf":false}}
Binary file modified tests/fixtures/test3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 1 addition & 26 deletions tests/fixtures/test3@2x.json
Original file line number Diff line number Diff line change
@@ -1,26 +1 @@
{
"airport": {
"height": 36,
"width": 36,
"x": 0,
"y": 92,
"pixelRatio": 2,
"sdf": false
},
"airport_xl": {
"height": 92,
"width": 92,
"x": 0,
"y": 0,
"pixelRatio": 2,
"sdf": false
},
"my_bbq": {
"height": 70,
"width": 70,
"x": 92,
"y": 0,
"pixelRatio": 2,
"sdf": false
}
}
{"airport":{"height":36,"width":36,"x":0,"y":92,"pixelRatio":2,"sdf":false},"airport_xl":{"height":92,"width":92,"x":0,"y":0,"pixelRatio":2,"sdf":false},"my_bbq":{"height":70,"width":70,"x":92,"y":0,"pixelRatio":2,"sdf":false}}
Binary file modified tests/fixtures/test3@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 1 addition & 42 deletions tests/fixtures/test4.json
Original file line number Diff line number Diff line change
@@ -1,42 +1 @@
{
"airport": {
"height": 21,
"width": 21,
"x": 0,
"y": 49,
"pixelRatio": 1,
"sdf": false
},
"arrow": {
"height": 21,
"width": 21,
"x": 21,
"y": 49,
"pixelRatio": 1,
"sdf": false
},
"circle": {
"height": 21,
"width": 21,
"x": 42,
"y": 49,
"pixelRatio": 1,
"sdf": false
},
"my_bbq": {
"height": 38,
"width": 38,
"x": 49,
"y": 0,
"pixelRatio": 1,
"sdf": false
},
"airport_xl": {
"height": 49,
"width": 49,
"x": 0,
"y": 0,
"pixelRatio": 1,
"sdf": false
}
}
{"airport":{"height":21,"width":21,"x":0,"y":49,"pixelRatio":1,"sdf":false},"arrow":{"height":21,"width":21,"x":21,"y":49,"pixelRatio":1,"sdf":false},"circle":{"height":21,"width":21,"x":42,"y":49,"pixelRatio":1,"sdf":false},"my_bbq":{"height":38,"width":38,"x":49,"y":0,"pixelRatio":1,"sdf":false},"airport_xl":{"height":49,"width":49,"x":0,"y":0,"pixelRatio":1,"sdf":false}}
Binary file modified tests/fixtures/test4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 82730d2

Please sign in to comment.