mirror of
https://github.com/svg/svgo.git
synced 2025-07-29 20:21:14 +03:00
go!
This commit is contained in:
20
lib/svgo.js
Normal file
20
lib/svgo.js
Normal 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));
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
};
|
Reference in New Issue
Block a user