1
0
mirror of https://github.com/svg/svgo.git synced 2025-07-29 20:21:14 +03:00
This commit is contained in:
deepsweet
2012-09-27 14:06:28 +03:00
parent b1f3a62809
commit 13af2ed95e
35 changed files with 2947 additions and 2 deletions

20
lib/svgo.js Normal file
View File

@ -0,0 +1,20 @@
var CONFIG = require('./config'),
SVG2JS = require('./svg2js'),
PLUGINS = require('./plugins'),
JS2SVG = require('./js2svg');
module.exports = function(svg, options) {
return CONFIG(options)
.then(function(config) {
return SVG2JS(svg, config.saxXMLParser)
.then(function(json) {
return JS2SVG(PLUGINS(json, config.plugins));
});
});
};