1
0
mirror of https://github.com/svg/svgo.git synced 2025-07-29 20:21:14 +03:00

Drop plugin by path support and load builtins statically

This commit is contained in:
Bogdan Chadkin
2021-02-15 12:00:45 +03:00
parent 8899f682b8
commit 2965e8ccdb
4 changed files with 60 additions and 33 deletions

View File

@ -6,8 +6,9 @@ exports.active = false;
exports.description = 'removes elements that are drawn outside of the viewbox (disabled by default)';
var SVGO = require('../lib/svgo.js'),
_path = require('./_path.js'),
const JSAPI = require('../lib/svgo/jsAPI.js');
var _path = require('./_path.js'),
intersects = _path.intersects,
path2js = _path.path2js,
viewBox,
@ -97,7 +98,7 @@ function parseViewBox(svg)
bottom: parseFloat(m[2]) + parseFloat(m[4])
};
var path = new SVGO().createContentItem({
var path = new JSAPI({
elem: 'path',
prefix: '',
local: 'path'