Skip to content

Commit

Permalink
Deprecate extendDefaultPlugins
Browse files Browse the repository at this point in the history
  • Loading branch information
TrySound committed Aug 12, 2021
1 parent c2acef1 commit fba15b4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/svgo/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,24 @@ const defaultPlugins = pluginsOrder.filter((name) => pluginsMap[name].active);
exports.defaultPlugins = defaultPlugins;

const extendDefaultPlugins = (plugins) => {
console.warn(
'\n"extendDefaultPlugins" utility is deprecated.\n' +
'Use "preset-default" plugin with overrides instead.\n' +
'For example:\n' +
`{\n` +
` name: 'preset-default',\n` +
` params: {\n` +
` overrides: {\n` +
` // customize plugin options\n` +
` convertShapeToPath: {\n` +
` convertArcs: true\n` +
` },\n` +
` // disable plugins\n` +
` convertPathData: false\n` +
` }\n` +
` }\n` +
`}\n`
);
const extendedPlugins = pluginsOrder.map((name) => ({
name,
active: pluginsMap[name].active,
Expand Down

0 comments on commit fba15b4

Please sign in to comment.