🔧 Update SVG size limit

This commit is contained in:
pheralb
2025-04-15 13:26:10 +01:00
parent 0261e29c79
commit adf8f6b0e0
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -109,7 +109,7 @@ pnpm install
> >
> - Remember to optimize SVG for web, you can use [SVGOMG](https://jakearchibald.github.io/svgomg/). > - Remember to optimize SVG for web, you can use [SVGOMG](https://jakearchibald.github.io/svgomg/).
> - When you optimize the SVG, make sure that the `viewBox` is not removed. > - When you optimize the SVG, make sure that the `viewBox` is not removed.
> - The size limit for each .svg is **20kb**. > - The size limit for each .svg is **21kb**.
4. Go to the [**`src/data/svgs.ts`**](https://github.com/pheralb/svgl/blob/main/src/data/svgs.ts) and add the information about your logo, following the structure: 4. Go to the [**`src/data/svgs.ts`**](https://github.com/pheralb/svgl/blob/main/src/data/svgs.ts) and add the information about your logo, following the structure:
+1 -2
View File
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const { readdir, stat } = require('fs').promises; const { readdir, stat } = require('fs').promises;
const { join } = require('path'); const { join } = require('path');
@@ -7,7 +6,7 @@ const core = require('@actions/core');
// 🔎 Settings: // 🔎 Settings:
const dir = '../../static/library'; const dir = '../../static/library';
const sizeLimit = 20000; // 20kb; const sizeLimit = 21504; // 21kb;
function convertBytes(bytes, format = 'KB') { function convertBytes(bytes, format = 'KB') {
if (format === 'KB') { if (format === 'KB') {