Son CV dans un terminal web en Javascript! https://terminal-cv.gregandev.fr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

26 lines
551 B

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = minifySvg;
var _svgo = require("svgo");
/** Minify SVG with SVGO */
function minifySvg(tree, options, svgoOptions = {}) {
tree.match({
tag: 'svg'
}, node => {
let svgStr = tree.render(node, {
closingSingleTag: 'slash',
quoteAllAttributes: true
});
const result = (0, _svgo.optimize)(svgStr, svgoOptions);
node.tag = false;
node.attrs = {};
node.content = result.data;
return node;
});
return tree;
}