Skip to content

Commit

Permalink
handle custom plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieudutour committed Aug 17, 2018
1 parent c14761a commit 2389b24
Show file tree
Hide file tree
Showing 5 changed files with 623 additions and 19 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ If for some reason you’re not happy with the default settings we’ve chosen,
- `indent`: Indent number when pretty printing SVGs
- `multipass`: Run the optimization 10 times
- `floatPrecision`: The precision of the numbers to use in all the plugins
- `debug`: Print some logs to help debug the SVGO configuration

### SVGO Plugins

Expand Down Expand Up @@ -592,6 +593,24 @@ Sorts element attributes to improve readability.

On by default in SVGO Compressor.

### Custom SVGO Plugins

__requires Sketch >= 52__

You can specify custom SVGO plugins by giving a relative path to a JS file instead of a name:

```diff
...
+ {
+ "path": "./SVGO-plugins/sRGB-blur.js",
+ "enabled": true,
+ "params": {}
+ }
```

You can find a list of custom SVGO plugins that the community created:
- [sRGB-blur](https://gist.github.com/mathieudutour/73309f6fb7fb6e7b830e20e43ee8f850) (see #40)

## Acknowledgements

We would like to thank:
Expand Down
Loading

0 comments on commit 2389b24

Please sign in to comment.