UNPKG

@fws/cli

Version:

This CLI is work in progress and it's meant to work together with other Forwardslash boilerplates. Please do not use it if you don't have access to other stuff.

51 lines (49 loc) 1.53 kB
/** * SVGO configuration * * @description Configure SVG Optimizer tool for optimizing SVG vector graphics files. */ const svgOmg = require('svgo'); module.exports = new svgOmg({ plugins: [ {cleanupAttrs: true}, {removeDoctype: true}, {removeXMLProcInst: true}, {removeComments: true}, {removeMetadata: true}, {removeTitle: true}, {removeDesc: true}, {removeUselessDefs: true}, {removeEditorsNSData: true}, {removeEmptyAttrs: true}, {removeHiddenElems: true}, {removeEmptyText: true}, {removeEmptyContainers: true}, {removeViewBox: false}, {cleanupEnableBackground: true}, {convertStyleToAttrs: true}, {convertColors: true}, {convertPathData: true}, {convertTransform: true}, {removeUnknownsAndDefaults: true}, {removeNonInheritableGroupAttrs: true}, {removeUselessStrokeAndFill: true}, {removeUnusedNS: true}, {cleanupIDs: true}, {cleanupNumericValues: true}, {moveElemsAttrsToGroup: true}, {moveGroupAttrsToElems: true}, {collapseGroups: true}, {removeRasterImages: false}, {mergePaths: true}, {convertShapeToPath: true}, {sortAttrs: true}, {removeDimensions: true}, {removeAttrs: {attrs: '(stroke|fill|style)'}}, { addAttributesToSVGElement: { attributes: ['fill="currentColor"'] } } ] });