From fba15b4c0e3b3ddf647901263b3b36f81d1e3250 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Thu, 12 Aug 2021 20:27:11 +0300 Subject: [PATCH] Deprecate extendDefaultPlugins --- lib/svgo/config.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/svgo/config.js b/lib/svgo/config.js index 3ea4135fc..12301b658 100644 --- a/lib/svgo/config.js +++ b/lib/svgo/config.js @@ -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,