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/create.js | 6 +++--- scripts/package.js | 20 +------------------- scripts/sample_recipe/icon.png | Bin 21037 -> 0 bytes 3 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 scripts/sample_recipe/icon.png (limited to 'scripts') diff --git a/scripts/create.js b/scripts/create.js index 12b0c15..b41d6d0 100644 --- a/scripts/create.js +++ b/scripts/create.js @@ -41,7 +41,7 @@ const filesThatNeedTextReplace = ['package.json', 'index.js', 'README.md']; if (await fs.exists(newRecipeFolder)) { console.log('⚠️ Recipe already exists'); return; - } + } console.log('[Info] Passed pre-checks'); @@ -62,9 +62,9 @@ const filesThatNeedTextReplace = ['package.json', 'index.js', 'README.md']; open(newRecipeFolder); console.log(`✅ Successfully created your recipe. - + What's next? - Make sure you restart Ferdi in order for the recipe to show up -- Customise "webview.js", "package.json", "icon.svg" and "icon.png (see https://github.com/getferdi/recipes/blob/master/docs/integration.md#recipe-structure) +- Customise "webview.js", "package.json" and "icon.svg" (see https://github.com/getferdi/recipes/blob/master/docs/integration.md#recipe-structure) - Publish your recipe (see https://github.com/getferdi/recipes/blob/master/docs/integration.md#publishing)`); })(); 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`, }, }; diff --git a/scripts/sample_recipe/icon.png b/scripts/sample_recipe/icon.png deleted file mode 100644 index dec90e0..0000000 Binary files a/scripts/sample_recipe/icon.png and /dev/null differ -- cgit v1.2.3-54-g00ecf