1
0
mirror of https://github.com/svg/svgo.git synced 2026-01-27 07:02:06 +03:00
Commit Graph

37 Commits

Author SHA1 Message Date
Seth Falco
49954bc0d9 chores: various clean ups regardin ESM and TypeScript (#2117) 2025-05-03 09:42:29 +01:00
Seth Falco
a8a53dbd90 chore: apply more eslint rules (#2116) 2025-05-02 10:00:37 +01:00
Seth Falco
8c593fab06 chore: bulk update all jsdoc and jsdoctypes (#2114) 2025-05-01 22:16:52 +01:00
Seth Falco
4573d0178e chore: migrate plugin types to plugin (#2111) 2025-04-30 02:16:53 +01:00
Antonio Salvati
e73d13a1a5 fix: convertColors plugin ignore currentColor in 'mask' elements (#2032) 2024-06-14 10:43:30 +01:00
Kendell R
a761a01038 fix(convertColors): accept commaless rgb (#2015) 2024-05-26 22:08:37 +01:00
JayLeininger
6747e3a047 feat(convertcolors): add param to convert colors to common case (#1692) 2024-01-07 16:28:24 +00:00
Jon Dufresne
2442f74239 chore: convert project to us ECMAScript modules (preserving CJS compatibility) (#1905) 2024-01-03 16:17:37 +00:00
Seth Falco
c2cacc7060 chore: move health files to .github (#1906) 2023-12-27 12:54:30 +00:00
Seth Falco
a3da8b3a76 refactor: use set in _collections (#1899) 2023-12-24 01:54:17 +00:00
Seth Falco
22533f1ffe chore: update prettier and eslint (#1885) 2023-12-15 13:10:21 +00:00
Bogdan Chadkin
e2e65cfc1e Move plugin types into d.ts 2022-11-11 12:19:38 +03:00
Bogdan Chadkin
e6bd703b0a Remove unused active and type fields from plugins 2022-10-08 23:39:58 +03:00
Bogdan Chadkin
cce036f285 Refactor convertColors (#1543)
- refactored with visitor plugin api
- covered with types
2021-08-25 20:52:21 +03:00
Bogdan Chadkin
07f8d606e0 Implement preset-default plugin (#1513)
I saw complaints about `extendDefaultPlugins` api

- it cannot be used when svgo is installed globally
- it requires svgo to be installed when using svgo-loader or svgo-jsx
- it prevents using serializable config formats like json

In this diff I introduced the new plugin which is a bundle of all
default plugins.

```js
module.exports = {
  plugins: [
    'preset_default',
    // or
    {
      name: 'preset_default',
      floatPrecision: 4,
      overrides: {
        convertPathData: {
          applyTransforms: false
        }
      }
    }
  ]
}
```
2021-08-13 19:07:08 +03:00
Bogdan Chadkin
8098ab7fb6 Replace attributes iterators with for/of (#1431)
These iterators allows to directly manipulate passed value
which does not let us to get rid from legacy "attrs" field.

Object.entries makes it easier to get an access to both attribute
name and value.
2021-03-17 12:50:16 +03:00
Bogdan Chadkin
e82a672bbf Prepare root and element nodes for xast
Ref https://github.com/syntax-tree/xast

- added type: root | element
- renamed elem to name
- replaced "elem" property checks with check for correct type
2021-03-10 18:49:26 +03:00
Bogdan Chadkin
00ec0f71fe Format all plugins with prettier 2021-03-09 19:58:00 +03:00
XhmikosR
1310210d4e Use https when possible and fix an inactive domain (#1374) 2021-02-25 13:48:18 +03:00
Bogdan Chadkin
9263d9ab90 Fix svg spec urls in plugins 2021-02-24 11:18:48 +03:00
Bogdan Chadkin
a7cc20bb43 Setup recommended eslint preset (#1345)
This is usually enough to prevent silly mistakes.
Formatting will be done by prettier after merging pull requests.
2021-02-19 15:26:07 +03:00
davidleston
898f0a2ca5 Closes svg/svgo#759. Upper case hex color now converts to shortname. 2017-07-12 17:15:13 -07:00
Sergey Alimov
dc259059fa Extend currentColor match conditions (string, rx, bool) 2016-12-19 14:55:43 +04:00
Jason
8e5706485e Add boundries to none regex 2016-03-22 08:33:24 -05:00
Jason
97ab6c2a6e Add currentColor param to convertColors plugin 2016-03-21 11:58:33 -05:00
GreLI
02c24c9ca8 Fixed crash on uppercase color name. Fixes #511 2016-03-08 16:34:41 +03:00
GreLI
a7f62d8984 Formatting 2015-06-21 19:13:41 +03:00
Yoshiya Hinosawa
3f8e6fd15c Fix lint 2015-06-12 00:25:32 +09:00
Yoshiya Hinosawa
8e6b365c40 Add --show-plugins option 2015-06-07 19:35:49 +09:00
GreLI
15e303bbf0 Convert colors now takes fractional percentages and minor improvements.
Fixes #175 and resolves #178.
2015-03-22 18:45:46 +03:00
GreLI
b868538fe3 Fixed breaking references. Resolves #274 2015-02-15 14:48:22 +03:00
Vasiliy Loginevskiy
ccd0541712 Add shortNames colors optimization. 2014-12-05 23:50:37 +03:00
deepsweet
2816424ed7 global refactoring dump 2013-04-09 22:06:27 +03:00
deepsweet
5485010269 'use strict' motherfucker! do you use it?! 2012-11-27 22:51:31 +02:00
deepsweet
291631509f lib/jsAPI: simplification and refactoring 2012-10-15 08:28:25 +03:00
deepsweet
43d716296a JSHint :-| 2012-10-12 22:36:12 +03:00
deepsweet
13af2ed95e go! 2012-09-27 14:06:28 +03:00