diff options
author | Amine Mouafik <amine@mouafik.fr> | 2020-04-17 21:05:38 +0100 |
---|---|---|
committer | Amine Mouafik <amine@mouafik.fr> | 2020-04-19 03:07:58 +0000 |
commit | b5fb5d4a83ca4340c8858433e1b70f180665b97c (patch) | |
tree | 15a1c96e30ebe52dbc37e06d4ddfb57006b8e0aa | |
parent | Repackage (diff) | |
download | ferdium-recipes-b5fb5d4a83ca4340c8858433e1b70f180665b97c.tar.gz ferdium-recipes-b5fb5d4a83ca4340c8858433e1b70f180665b97c.tar.zst ferdium-recipes-b5fb5d4a83ca4340c8858433e1b70f180665b97c.zip |
Remove svg size check preventing repackaging
-rw-r--r-- | scripts/api/package.js | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/scripts/api/package.js b/scripts/api/package.js index 2d265f6..9c3ede5 100644 --- a/scripts/api/package.js +++ b/scripts/api/package.js | |||
@@ -73,26 +73,12 @@ For more information about recipe icons visit https://github.com/getferdi/recipe | |||
73 | // Check that icons have the right dimensions | 73 | // Check that icons have the right dimensions |
74 | const pngSize = sizeOf(pngIcon); | 74 | const pngSize = sizeOf(pngIcon); |
75 | const pngHasRightSize = pngSize.width === 1024 && pngSize.height === 1024; | 75 | const pngHasRightSize = pngSize.width === 1024 && pngSize.height === 1024; |
76 | const svgSize = sizeOf(svgIcon); | 76 | if (!pngHasRightSize) { |
77 | const svgHasRightSize = svgSize.width === 1024 && svgSize.height === 1024; | ||
78 | if (!pngHasRightSize && !svgHasRightSize) { | ||
79 | console.log(`⚠️ Could not add your recipe: Icons require to be 1024x1024px in size. | ||
80 | Both your "icon.png" and "icon.svg" don't seem to have the right size. | ||
81 | You can use software like Photoshop, GIMP or Photopea (https://www.photopea.com/) to resize your icons. | ||
82 | For more information about recipe icons visit https://github.com/getferdi/recipes/blob/master/docs/integration.md#icons`); | ||
83 | return; | ||
84 | } else if (!pngHasRightSize) { | ||
85 | console.log(`⚠️ Could not add your recipe: "icon.png" should be to be 1024x1024px in size. | 77 | console.log(`⚠️ Could not add your recipe: "icon.png" should be to be 1024x1024px in size. |
86 | Please make sure that your "icon.png" has the right size of 1024x1024px in size. | 78 | Please make sure that your "icon.png" has the right size of 1024x1024px in size. |
87 | You can use software like Photoshop, GIMP or Photopea (https://www.photopea.com/) to resize your icons. | 79 | You can use software like Photoshop, GIMP or Photopea (https://www.photopea.com/) to resize your icons. |
88 | For more information about recipe icons visit https://github.com/getferdi/recipes/blob/master/docs/integration.md#icons`); | 80 | For more information about recipe icons visit https://github.com/getferdi/recipes/blob/master/docs/integration.md#icons`); |
89 | return; | 81 | return; |
90 | } else if (!svgHasRightSize) { | ||
91 | console.log(`⚠️ Could not add your recipe: "icon.svg" should be to be 1024x1024px in size. | ||
92 | Please make sure that your "icon.svg" has the right size of 1024x1024px in size. | ||
93 | You can use software like Photoshop, GIMP or Photopea (https://www.photopea.com/) to resize your icons. | ||
94 | For more information about recipe icons visit https://github.com/getferdi/recipes/blob/master/docs/integration.md#icons`); | ||
95 | return; | ||
96 | } | 82 | } |
97 | 83 | ||
98 | // Read package.json | 84 | // Read package.json |