From 23041adee9590064c455e5d4a511fc89b5d80546 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Mon, 5 Jul 2021 08:42:26 +0530 Subject: Removed references to png images since they were not being used anyways. --- scripts/package.js | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'scripts/package.js') diff --git a/scripts/package.js b/scripts/package.js index a6c23ca..36f6a4a 100644 --- a/scripts/package.js +++ b/scripts/package.js @@ -62,7 +62,6 @@ const compress = (src, dest) => new Promise((resolve, reject) => { const recipeSrc = path.join(recipesFolder, recipe); const packageJson = path.join(recipeSrc, 'package.json'); const svgIcon = path.join(recipeSrc, 'icon.svg'); - const pngIcon = path.join(recipeSrc, 'icon.png'); // Check that package.json exists if (!await fs.pathExists(packageJson)) { @@ -73,18 +72,10 @@ const compress = (src, dest) => new Promise((resolve, reject) => { // Check that icons exist const hasSvg = await fs.pathExists(svgIcon); - const hasPng = await fs.pathExists(pngIcon); - if (!hasSvg && !hasPng) { - console.log(`⚠️ Couldn't package "${recipe}": Recipe doesn't contain an icon SVG and PNG`); - unsuccessful++; - } else if (!hasSvg) { + if (!hasSvg) { console.log(`⚠️ Couldn't package "${recipe}": Recipe doesn't contain an icon SVG`); unsuccessful++; continue; - } else if (!hasPng) { - console.log(`⚠️ Couldn't package "${recipe}": Recipe doesn't contain an icon PNG`); - unsuccessful++; - continue; } // Check icons sizes @@ -96,14 +87,6 @@ const compress = (src, dest) => new Promise((resolve, reject) => { continue; } - const pngSize = sizeOf(pngIcon); - const pngHasRightSize = pngSize.width === 1024 && pngSize.height === 1024; - if (!pngHasRightSize) { - console.log(`⚠️ Couldn't package "${recipe}": Recipe PNG icon dimensions should be 1024x1024`); - unsuccessful++; - continue; - } - // Read package.json const config = await fs.readJson(packageJson) @@ -181,7 +164,6 @@ const compress = (src, dest) => new Promise((resolve, reject) => { "name": config.name, "version": config.version, "icons": { - "png": `${repo}${config.id}/icon.png`, "svg": `${repo}${config.id}/icon.svg`, }, }; -- cgit v1.2.3-70-g09d2