1
0
mirror of https://github.com/svg/svgo.git synced 2025-04-19 10:22:15 +03:00

16 Commits

Author SHA1 Message Date
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
9892e28a71
Refactor convertShapeToPath with visitor api (#1519)
This plugin also removes invalid polyline and polygon.
Looks like out of pluginn scope.
2021-08-12 21:21:38 +03:00
Bogdan Chadkin
6f2f62c5ee
Access attributes directly (#1433)
Got rid from `.attrs`, `.attr()` and `.addAttr()` usages
2021-03-18 18:53:20 +03:00
Bogdan Chadkin
07928fc77e
Replace removeAttr with delete operator (#1432)
delete operator is more explicit and not much harder to use.
2021-03-17 21:40:06 +03:00
Bogdan Chadkin
d1d6e5efe8
Remove prefix/local support in elements and attributes (#1413)
These parts of element and attribute name are easy to extract.
Now we can easily replace attrs with xast attributes object.
2021-03-10 13:26:15 +03:00
Bogdan Chadkin
e2ec7e8bd2
[convertShapeToPath] round path numbers with precision (#1404)
Ref https://github.com/svg/svgo/issues/1051

Note: review with hidden whitespaces
2021-03-05 01:12:50 +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
Alex Lockwood
999cfbd97c Convert circles/ellipses to paths (#818) 2017-10-29 10:45:35 +03:00
GreLI
ce4446550c Always close polygons. Resolves #441 2015-11-08 19:13:45 +03:00
GreLI
a7f62d8984 Formatting 2015-06-21 19:13:41 +03:00
Yoshiya Hinosawa
8e6b365c40 Add --show-plugins option 2015-06-07 19:35:49 +09:00
GreLI
62cfb364c4 Slightly improved convertShapeToPath 2015-03-15 13:17:06 +03:00
GreLI
eecfabd5a9 Code styled and logic improvement in convertShapeToPath 2015-02-23 23:06:18 +03:00
GreLI
5e7caa49dc Code styling 2015-02-08 19:31:55 +03:00
Lev Solntsev
389368c2c9 new plugin converting some basic shapes to path 2013-11-29 14:17:58 +04:00