-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba9a745
commit 4734fd1
Showing
6 changed files
with
77 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Builtin Plugins | ||
|
||
In addition to the [default plugins](./preset-default.md), the following plugins are available, but must be enabled with the [`--enable` command line option in order to be used: | ||
](./command-line-options.md#enable) | ||
|
||
- [round](./plugins/round.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Custom Configuration Files | ||
|
||
If you are using only the builtin plugins distributed with **svgo-ll**, you should be able to do all configuration from the [command line](./command-line-options.md), but if you are using custom plugins or have a complex configuration, you may want to use a custom configuration file. | ||
|
||
A custom configuration file is a JavaScript file that exports a [`Config` object](https://github.com/svg-utils/svgo-ll/blob/main/lib/svgo.d.ts), for example: | ||
|
||
```js | ||
import importedPlugin from './imported-plugin'; | ||
|
||
export default { | ||
plugins: [ | ||
// plugin imported from another JavaScript file | ||
importedPlugin, | ||
|
||
// plugin defined inline | ||
{ | ||
name: 'customPlugin', | ||
params: { | ||
paramName: 'paramValue', | ||
}, | ||
fn: (ast, params, info) => {}, | ||
}, | ||
], | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters