Svgo: Document plugins usage programmatically

Created on 2 Nov 2016  Â·  4Comments  Â·  Source: svg/svgo

I had to look in GitHub issues to see how others were able to pass plugins for programmatic usage. Maybe you could add another example to examples folder showing plugins usage.

{
    plugins: [
        { mergePaths: false },
        {
            cleanupIDs: {
                prefix: filename + '-',
                remove: false,
                minify: true,
            }
        }
    ]
}

Most helpful comment

I've got a similar question ...
How do you enable plug-ins via command line?
Everything I tried didn't work
I'm particularly interested in

  • removeAttrs
  • removeTitle
  • cleanupIDs
  • collapseGroups
  • removeStyleElement
  • mergePaths

What I'm trying to do is cleaing up Illustrator asset SVGs as good as possible.
However, I couldn't find any examples online.
Maybe you could add some more examples for the plug-ins to the documentation?

All 4 comments

Have you more concrete suggestions?

I've got a similar question ...
How do you enable plug-ins via command line?
Everything I tried didn't work
I'm particularly interested in

  • removeAttrs
  • removeTitle
  • cleanupIDs
  • collapseGroups
  • removeStyleElement
  • mergePaths

What I'm trying to do is cleaing up Illustrator asset SVGs as good as possible.
However, I couldn't find any examples online.
Maybe you could add some more examples for the plug-ins to the documentation?

@GreLI: I'd like to help here by writing some documentation about how to use SVG via Node. Right now there's an example — I think we could have a Markdown document that explains the example and also explains how to pass plugins. Are you interested in this?

Yep, any commitment is welcome.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pixelass picture pixelass  Â·  3Comments

ai picture ai  Â·  5Comments

jwilson8767 picture jwilson8767  Â·  4Comments

gregberge picture gregberge  Â·  3Comments

onlymega picture onlymega  Â·  6Comments