diff --git a/examples/test.js b/examples/test.js index fda337b42..b6fc31abe 100644 --- a/examples/test.js +++ b/examples/test.js @@ -4,7 +4,79 @@ var FS = require('fs'), PATH = require('path'), SVGO = require('../lib/svgo'), filepath = PATH.resolve(__dirname, 'test.svg'), - svgo = new SVGO(/*{ custom config object }*/); + svgo = new SVGO({ + 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, + },{ + transformsWithOnePath: false, + },{ + removeDimensions: true, + },{ + removeAttrs: {attrs: '(stroke|fill)'}, + }] + }); FS.readFile(filepath, 'utf8', function(err, data) {