Seth Falco
747cc722d9
chore: revamp how we export types ( #2118 )
2025-05-04 17:39:44 +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
Jon Dufresne
2442f74239
chore: convert project to us ECMAScript modules (preserving CJS compatibility) ( #1905 )
2024-01-03 16:17:37 +00:00
Abe Fehr
437c09b006
Add support for image/jpeg mimetype ( #1742 )
...
In practice, this plugin does not work to remove embedded jpg images.
On further inspection, it's because the plugin is looking for
image/jpg, which I'm not even sure is a valid mimetype. Inkscape uses
image/jpeg as the mimetype for embedded JPG images.
Co-authored-by: Seth Falco <seth@falco.fun >
2023-09-24 13:32:13 +01: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
9b8f13e911
Add plugin types ( #1527 )
...
Covered following plugins
- addAttributesToSVGElement.js
- addClassesToSVGElement.js
- cleanupAttrs.js
- convertEllipseToCircle.js
- removeAttributesBySelector.js
- removeAttrs.js
- removeComments.js
- removeDesc.js
- removeDoctype.js
- removeElementsByAttr.js
- removeEmptyText.js
- removeMetadata.js
- removeRasterImages.js
- removeScriptElement.js
- removeStyleElement.js
- removeTitle.js
- removeXMLProcInst.js
2021-08-15 13:52:41 +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
f00bd727b0
Refactor basic plugins with visitor api ( #1518 )
...
- cleanupAttrs
- convertEllipseToCircle
- removeDesc
- removeDoctype
- removeEmptyText
- removeMetadata
- removeRasterImages
- removeScriptElement
- removeStyleElement
- removeTitle
- removeXMLProcInst
2021-08-12 14:57:36 +03:00
Bogdan Chadkin
316a002299
Remove hasAttr and hasAttrLocal usages ( #1447 )
...
In most cases simple check for null is enough.
2021-03-22 01:24:59 +03:00
Bogdan Chadkin
00ec0f71fe
Format all plugins with prettier
2021-03-09 19:58:00 +03:00
GreLI
c3e0eb6b00
Check for "href’ by local name
2016-03-11 13:31:30 +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
deepsweet
2816424ed7
global refactoring dump
2013-04-09 22:06:27 +03:00
deepsweet
f944a2af57
plugins/removeRasterImages: add gif format
2013-02-13 17:24:25 +02:00
deepsweet
7ddc8ebbc0
plugins/removeRasterImages: remove raster images references in <image> (disabled by default) ( close #98 )
2013-02-13 17:22:15 +02:00