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

5 Commits

Author SHA1 Message Date
Bogdan Chadkin
bb3f1a99ef [new plugin] reimplement inlineDefs
The code is taken from https://github.com/svg/svgo/pull/976, refactored
with new api, covered types and simplified.

Plugin has no dependencies so can be used without changing.

```
const inlineDefs = require('./inlineDefs.js');

module.exports = {
  plugins: [
    'preset-default',
    inlineDefs
  ]
};
```
2022-02-21 19:12:53 +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
strarsis
19c77d2398
Add mergeStyles plugin (#1381) 2021-03-27 16:59:56 +03:00
Bogdan Chadkin
225bfbb053 Move config processing into optimize 2021-02-15 16:57:01 +03:00
Bogdan Chadkin
2965e8ccdb Drop plugin by path support and load builtins statically 2021-02-15 12:00:45 +03:00