diff --git a/plugins/addAttributesToSVGElement.js b/plugins/addAttributesToSVGElement.js index 337131cd..0214a6c1 100644 --- a/plugins/addAttributesToSVGElement.js +++ b/plugins/addAttributesToSVGElement.js @@ -1,8 +1,6 @@ 'use strict'; exports.name = 'addAttributesToSVGElement'; -exports.type = 'visitor'; -exports.active = false; exports.description = 'adds attributes to an outer element'; var ENOCLS = `Error in plugin "addAttributesToSVGElement": absent parameters. diff --git a/plugins/addClassesToSVGElement.js b/plugins/addClassesToSVGElement.js index 140223be..1bde12a2 100644 --- a/plugins/addClassesToSVGElement.js +++ b/plugins/addClassesToSVGElement.js @@ -1,8 +1,6 @@ 'use strict'; exports.name = 'addClassesToSVGElement'; -exports.type = 'visitor'; -exports.active = false; exports.description = 'adds classnames to an outer element'; var ENOCLS = `Error in plugin "addClassesToSVGElement": absent parameters. diff --git a/plugins/cleanupAttrs.js b/plugins/cleanupAttrs.js index d271b15f..54b703fd 100644 --- a/plugins/cleanupAttrs.js +++ b/plugins/cleanupAttrs.js @@ -1,8 +1,6 @@ 'use strict'; exports.name = 'cleanupAttrs'; -exports.type = 'visitor'; -exports.active = true; exports.description = 'cleanups attributes from newlines, trailing and repeating spaces'; diff --git a/plugins/cleanupEnableBackground.js b/plugins/cleanupEnableBackground.js index a4062f30..3afb48ea 100644 --- a/plugins/cleanupEnableBackground.js +++ b/plugins/cleanupEnableBackground.js @@ -2,9 +2,7 @@ const { visit } = require('../lib/xast.js'); -exports.type = 'visitor'; exports.name = 'cleanupEnableBackground'; -exports.active = true; exports.description = 'remove or cleanup enable-background attribute when possible'; diff --git a/plugins/cleanupIDs.js b/plugins/cleanupIDs.js index 45bfe281..bd1a2a7a 100644 --- a/plugins/cleanupIDs.js +++ b/plugins/cleanupIDs.js @@ -7,9 +7,7 @@ const { visitSkip } = require('../lib/xast.js'); const { referencesProps } = require('./_collections.js'); -exports.type = 'visitor'; exports.name = 'cleanupIDs'; -exports.active = true; exports.description = 'removes unused IDs and minifies used'; const regReferencesUrl = /\burl\(("|')?#(.+?)\1\)/; diff --git a/plugins/cleanupListOfValues.js b/plugins/cleanupListOfValues.js index 7f93d1a2..ca2997b3 100644 --- a/plugins/cleanupListOfValues.js +++ b/plugins/cleanupListOfValues.js @@ -3,8 +3,6 @@ const { removeLeadingZero } = require('../lib/svgo/tools.js'); exports.name = 'cleanupListOfValues'; -exports.type = 'visitor'; -exports.active = false; exports.description = 'rounds list of values to the fixed precision'; const regNumericValues = diff --git a/plugins/cleanupNumericValues.js b/plugins/cleanupNumericValues.js index 50786172..f099b50b 100644 --- a/plugins/cleanupNumericValues.js +++ b/plugins/cleanupNumericValues.js @@ -3,8 +3,6 @@ const { removeLeadingZero } = require('../lib/svgo/tools'); exports.name = 'cleanupNumericValues'; -exports.type = 'visitor'; -exports.active = true; exports.description = 'rounds numeric values to the fixed precision, removes default ‘px’ units'; diff --git a/plugins/collapseGroups.js b/plugins/collapseGroups.js index 6897d2d4..469ca694 100644 --- a/plugins/collapseGroups.js +++ b/plugins/collapseGroups.js @@ -6,9 +6,7 @@ const { inheritableAttrs, elemsGroups } = require('./_collections.js'); -exports.type = 'visitor'; exports.name = 'collapseGroups'; -exports.active = true; exports.description = 'collapses useless groups'; /** diff --git a/plugins/convertColors.js b/plugins/convertColors.js index 3f3cece1..1e14fca3 100644 --- a/plugins/convertColors.js +++ b/plugins/convertColors.js @@ -2,9 +2,7 @@ const collections = require('./_collections.js'); -exports.type = 'visitor'; exports.name = 'convertColors'; -exports.active = true; exports.description = 'converts colors: rgb() to #rrggbb and #rrggbb to #rgb'; const rNumber = '([+-]?(?:\\d*\\.\\d+|\\d+\\.?)%?)'; diff --git a/plugins/convertEllipseToCircle.js b/plugins/convertEllipseToCircle.js index 57b26a70..aa6821ed 100644 --- a/plugins/convertEllipseToCircle.js +++ b/plugins/convertEllipseToCircle.js @@ -1,8 +1,6 @@ 'use strict'; exports.name = 'convertEllipseToCircle'; -exports.type = 'visitor'; -exports.active = true; exports.description = 'converts non-eccentric s to s'; /** diff --git a/plugins/convertPathData.js b/plugins/convertPathData.js index e5792340..0996a952 100644 --- a/plugins/convertPathData.js +++ b/plugins/convertPathData.js @@ -8,8 +8,6 @@ const { applyTransforms } = require('./applyTransforms.js'); const { cleanupOutData } = require('../lib/svgo/tools'); exports.name = 'convertPathData'; -exports.type = 'visitor'; -exports.active = true; exports.description = 'optimizes path data: writes in shorter form, applies transformations'; diff --git a/plugins/convertShapeToPath.js b/plugins/convertShapeToPath.js index 4a1fb625..b33e6e71 100644 --- a/plugins/convertShapeToPath.js +++ b/plugins/convertShapeToPath.js @@ -8,8 +8,6 @@ const { stringifyPathData } = require('../lib/path.js'); const { detachNodeFromParent } = require('../lib/xast.js'); exports.name = 'convertShapeToPath'; -exports.type = 'visitor'; -exports.active = true; exports.description = 'converts basic shapes to more compact path form'; const regNumber = /[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/g; diff --git a/plugins/convertStyleToAttrs.js b/plugins/convertStyleToAttrs.js index 5914175e..5986615d 100644 --- a/plugins/convertStyleToAttrs.js +++ b/plugins/convertStyleToAttrs.js @@ -2,9 +2,7 @@ const { attrsGroups } = require('./_collections'); -exports.type = 'visitor'; exports.name = 'convertStyleToAttrs'; -exports.active = false; exports.description = 'converts style to attributes'; /** diff --git a/plugins/convertTransform.js b/plugins/convertTransform.js index 09503216..f07634e0 100644 --- a/plugins/convertTransform.js +++ b/plugins/convertTransform.js @@ -11,9 +11,7 @@ const { matrixToTransform, } = require('./_transforms.js'); -exports.type = 'visitor'; exports.name = 'convertTransform'; -exports.active = true; exports.description = 'collapses multiple transformations and optimizes it'; /** diff --git a/plugins/inlineStyles.js b/plugins/inlineStyles.js index 7667cb44..e446a6c1 100644 --- a/plugins/inlineStyles.js +++ b/plugins/inlineStyles.js @@ -17,9 +17,7 @@ const { detachNodeFromParent, } = require('../lib/xast.js'); -exports.type = 'visitor'; exports.name = 'inlineStyles'; -exports.active = true; exports.description = 'inline styles (additional options)'; /** diff --git a/plugins/mergePaths.js b/plugins/mergePaths.js index 3380fdc2..011dad91 100644 --- a/plugins/mergePaths.js +++ b/plugins/mergePaths.js @@ -4,9 +4,7 @@ const { detachNodeFromParent } = require('../lib/xast.js'); const { collectStylesheet, computeStyle } = require('../lib/style.js'); const { path2js, js2path, intersects } = require('./_path.js'); -exports.type = 'visitor'; exports.name = 'mergePaths'; -exports.active = true; exports.description = 'merges multiple paths in one if possible'; /** diff --git a/plugins/mergeStyles.js b/plugins/mergeStyles.js index b8967b11..18a6e2b1 100644 --- a/plugins/mergeStyles.js +++ b/plugins/mergeStyles.js @@ -8,8 +8,6 @@ const { visitSkip, detachNodeFromParent } = require('../lib/xast.js'); exports.name = 'mergeStyles'; -exports.type = 'visitor'; -exports.active = true; exports.description = 'merge multiple style elements into one'; /** diff --git a/plugins/minifyStyles.js b/plugins/minifyStyles.js index c6cb13a6..a53675ee 100644 --- a/plugins/minifyStyles.js +++ b/plugins/minifyStyles.js @@ -6,9 +6,7 @@ const csso = require('csso'); -exports.type = 'visitor'; exports.name = 'minifyStyles'; -exports.active = true; exports.description = 'minifies styles and removes unused styles based on usage data'; diff --git a/plugins/moveElemsAttrsToGroup.js b/plugins/moveElemsAttrsToGroup.js index 5012f045..7fe28d06 100644 --- a/plugins/moveElemsAttrsToGroup.js +++ b/plugins/moveElemsAttrsToGroup.js @@ -3,9 +3,7 @@ const { visit } = require('../lib/xast.js'); const { inheritableAttrs, pathElems } = require('./_collections.js'); -exports.type = 'visitor'; exports.name = 'moveElemsAttrsToGroup'; -exports.active = true; exports.description = 'Move common attributes of group children to the group'; /** diff --git a/plugins/moveGroupAttrsToElems.js b/plugins/moveGroupAttrsToElems.js index 805a427a..a25984eb 100644 --- a/plugins/moveGroupAttrsToElems.js +++ b/plugins/moveGroupAttrsToElems.js @@ -2,9 +2,7 @@ const { pathElems, referencesProps } = require('./_collections.js'); -exports.type = 'visitor'; exports.name = 'moveGroupAttrsToElems'; -exports.active = true; exports.description = 'moves some group attributes to the content elements'; const pathElemsWithGroupsAndText = [...pathElems, 'g', 'text']; diff --git a/plugins/prefixIds.js b/plugins/prefixIds.js index 0ce7464c..6ae23ce5 100644 --- a/plugins/prefixIds.js +++ b/plugins/prefixIds.js @@ -8,9 +8,7 @@ const { referencesProps } = require('./_collections.js'); * @typedef {import('../lib/types').PluginInfo} PluginInfo */ -exports.type = 'visitor'; exports.name = 'prefixIds'; -exports.active = false; exports.description = 'prefix IDs'; /** diff --git a/plugins/removeAttributesBySelector.js b/plugins/removeAttributesBySelector.js index 691df7b4..92a331b9 100644 --- a/plugins/removeAttributesBySelector.js +++ b/plugins/removeAttributesBySelector.js @@ -3,8 +3,6 @@ const { querySelectorAll } = require('../lib/xast.js'); exports.name = 'removeAttributesBySelector'; -exports.type = 'visitor'; -exports.active = false; exports.description = 'removes attributes of elements that match a css selector'; diff --git a/plugins/removeAttrs.js b/plugins/removeAttrs.js index db1a2406..7773e2ae 100644 --- a/plugins/removeAttrs.js +++ b/plugins/removeAttrs.js @@ -1,8 +1,6 @@ 'use strict'; exports.name = 'removeAttrs'; -exports.type = 'visitor'; -exports.active = false; exports.description = 'removes specified attributes'; const DEFAULT_SEPARATOR = ':'; diff --git a/plugins/removeComments.js b/plugins/removeComments.js index c3899575..8da9d75a 100644 --- a/plugins/removeComments.js +++ b/plugins/removeComments.js @@ -3,8 +3,6 @@ const { detachNodeFromParent } = require('../lib/xast.js'); exports.name = 'removeComments'; -exports.type = 'visitor'; -exports.active = true; exports.description = 'removes comments'; /** diff --git a/plugins/removeDesc.js b/plugins/removeDesc.js index 9cdf9dcf..eeafb702 100644 --- a/plugins/removeDesc.js +++ b/plugins/removeDesc.js @@ -3,8 +3,6 @@ const { detachNodeFromParent } = require('../lib/xast.js'); exports.name = 'removeDesc'; -exports.type = 'visitor'; -exports.active = true; exports.description = 'removes '; const standardDescs = /^(Created with|Created using)/; diff --git a/plugins/removeDimensions.js b/plugins/removeDimensions.js index f00ef0b5..4024b239 100644 --- a/plugins/removeDimensions.js +++ b/plugins/removeDimensions.js @@ -1,8 +1,6 @@ 'use strict'; -exports.type = 'visitor'; exports.name = 'removeDimensions'; -exports.active = false; exports.description = 'removes width and height in presence of viewBox (opposite to removeViewBox, disable it first)'; diff --git a/plugins/removeDoctype.js b/plugins/removeDoctype.js index 81634ecf..41621282 100644 --- a/plugins/removeDoctype.js +++ b/plugins/removeDoctype.js @@ -3,8 +3,6 @@ const { detachNodeFromParent } = require('../lib/xast.js'); exports.name = 'removeDoctype'; -exports.type = 'visitor'; -exports.active = true; exports.description = 'removes doctype declaration'; /** diff --git a/plugins/removeEditorsNSData.js b/plugins/removeEditorsNSData.js index 5c249ec8..25d1ae6b 100644 --- a/plugins/removeEditorsNSData.js +++ b/plugins/removeEditorsNSData.js @@ -3,9 +3,7 @@ const { detachNodeFromParent } = require('../lib/xast.js'); const { editorNamespaces } = require('./_collections.js'); -exports.type = 'visitor'; exports.name = 'removeEditorsNSData'; -exports.active = true; exports.description = 'removes editors namespaces, elements and attributes'; /** diff --git a/plugins/removeElementsByAttr.js b/plugins/removeElementsByAttr.js index 4cac8b5e..d38761e4 100644 --- a/plugins/removeElementsByAttr.js +++ b/plugins/removeElementsByAttr.js @@ -3,8 +3,6 @@ const { detachNodeFromParent } = require('../lib/xast.js'); exports.name = 'removeElementsByAttr'; -exports.type = 'visitor'; -exports.active = false; exports.description = 'removes arbitrary elements by ID or className (disabled by default)'; diff --git a/plugins/removeEmptyAttrs.js b/plugins/removeEmptyAttrs.js index 5d9870a2..f9a7af3e 100644 --- a/plugins/removeEmptyAttrs.js +++ b/plugins/removeEmptyAttrs.js @@ -2,9 +2,7 @@ const { attrsGroups } = require('./_collections.js'); -exports.type = 'visitor'; exports.name = 'removeEmptyAttrs'; -exports.active = true; exports.description = 'removes empty attributes'; /** diff --git a/plugins/removeEmptyContainers.js b/plugins/removeEmptyContainers.js index 0a49db0b..cef0adec 100644 --- a/plugins/removeEmptyContainers.js +++ b/plugins/removeEmptyContainers.js @@ -3,9 +3,7 @@ const { detachNodeFromParent } = require('../lib/xast.js'); const { elemsGroups } = require('./_collections.js'); -exports.type = 'visitor'; exports.name = 'removeEmptyContainers'; -exports.active = true; exports.description = 'removes empty container elements'; /** diff --git a/plugins/removeEmptyText.js b/plugins/removeEmptyText.js index eb2713a1..d39b9c9a 100644 --- a/plugins/removeEmptyText.js +++ b/plugins/removeEmptyText.js @@ -3,8 +3,6 @@ const { detachNodeFromParent } = require('../lib/xast.js'); exports.name = 'removeEmptyText'; -exports.type = 'visitor'; -exports.active = true; exports.description = 'removes empty elements'; /** diff --git a/plugins/removeHiddenElems.js b/plugins/removeHiddenElems.js index 16140f4a..95979f77 100644 --- a/plugins/removeHiddenElems.js +++ b/plugins/removeHiddenElems.js @@ -10,8 +10,6 @@ const { collectStylesheet, computeStyle } = require('../lib/style.js'); const { parsePathData } = require('../lib/path.js'); exports.name = 'removeHiddenElems'; -exports.type = 'visitor'; -exports.active = true; exports.description = 'removes hidden elements (zero sized, with absent attributes)'; diff --git a/plugins/removeMetadata.js b/plugins/removeMetadata.js index b71b2e8b..8353bd20 100644 --- a/plugins/removeMetadata.js +++ b/plugins/removeMetadata.js @@ -3,8 +3,6 @@ const { detachNodeFromParent } = require('../lib/xast.js'); exports.name = 'removeMetadata'; -exports.type = 'visitor'; -exports.active = true; exports.description = 'removes '; /** diff --git a/plugins/removeNonInheritableGroupAttrs.js b/plugins/removeNonInheritableGroupAttrs.js index ffe4ec01..10a3528d 100644 --- a/plugins/removeNonInheritableGroupAttrs.js +++ b/plugins/removeNonInheritableGroupAttrs.js @@ -6,9 +6,7 @@ const { presentationNonInheritableGroupAttrs, } = require('./_collections'); -exports.type = 'visitor'; exports.name = 'removeNonInheritableGroupAttrs'; -exports.active = true; exports.description = 'removes non-inheritable group’s presentational attributes'; diff --git a/plugins/removeOffCanvasPaths.js b/plugins/removeOffCanvasPaths.js index 5f05308a..7494d801 100644 --- a/plugins/removeOffCanvasPaths.js +++ b/plugins/removeOffCanvasPaths.js @@ -8,9 +8,7 @@ const { visitSkip, detachNodeFromParent } = require('../lib/xast.js'); const { parsePathData } = require('../lib/path.js'); const { intersects } = require('./_path.js'); -exports.type = 'visitor'; exports.name = 'removeOffCanvasPaths'; -exports.active = false; exports.description = 'removes elements that are drawn outside of the viewbox (disabled by default)'; diff --git a/plugins/removeRasterImages.js b/plugins/removeRasterImages.js index 84d396c3..4f43ba14 100644 --- a/plugins/removeRasterImages.js +++ b/plugins/removeRasterImages.js @@ -3,8 +3,6 @@ const { detachNodeFromParent } = require('../lib/xast.js'); exports.name = 'removeRasterImages'; -exports.type = 'visitor'; -exports.active = false; exports.description = 'removes raster images (disabled by default)'; /** diff --git a/plugins/removeScriptElement.js b/plugins/removeScriptElement.js index c2e9946c..dc41a510 100644 --- a/plugins/removeScriptElement.js +++ b/plugins/removeScriptElement.js @@ -3,8 +3,6 @@ const { detachNodeFromParent } = require('../lib/xast.js'); exports.name = 'removeScriptElement'; -exports.type = 'visitor'; -exports.active = false; exports.description = 'removes