mirror of
https://github.com/pheralb/svgl.git
synced 2025-12-29 08:01:36 +08:00
🔧 Update SVG size limit
This commit is contained in:
@@ -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,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') {
|
||||||
|
|||||||
Reference in New Issue
Block a user