mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 08:50:57 -05:00
15 lines
379 B
JavaScript
15 lines
379 B
JavaScript
const plugins = [
|
|
{removeDimensions: true},
|
|
{removeXMLNS: true},
|
|
{removeScriptElement: true},
|
|
{removeViewBox: false},
|
|
{moveElemsAttrsToGroup: false}
|
|
];
|
|
|
|
const svgc = require("./src/svgclean.js");
|
|
const inst = svgc.configure({plugins, multipass: undefined});
|
|
|
|
exports.optimize = function(data) {
|
|
return svgc.optimize(inst, data)
|
|
.then((result) => result.data);
|
|
};
|