1

Trying to use svgo to batch convert shapes to paths from svg files.

https://github.com/svg/svgo

svgo --version
1.2.0

looklike ellipse element are not converted to paths

made test on commande line like :

➜ svg svgo --enable=convertShapeToPath 1.svg

➜ svg svgo --enable=convertShapeToPath --config=conf.json --pretty 1.svg

with config.json having

{ "convertArcs": true }

also tried with

"plugins": [
    {
  "name": "convertShapeToPath",
  "params": {
    "convertArcs": true
  }
},

also tried

{
  "pretty": true,
  "multipass": true,
  "floatPrecision": 2,
  "plugins": [
    {
      "name": "convertShapeToPath",
      "enabled": true,
      "params": {
        "convertArcs": true
      }
    }  
  ]
}  
Sebastian Kreft
  • 7,819
  • 3
  • 24
  • 41
direxit
  • 367
  • 3
  • 18
  • What do you want to achieve with this question? You've raised it on the [site's issue tracker](https://github.com/svg/svgo/pull/818) which is probably where I'd point you to. – Robert Longson Mar 17 '19 at 15:50
  • @RobertLongson What do i want to achieve ? maybe find someone that already face that problem and who may help, isn't that stackoverflow purpose ? – direxit Mar 17 '19 at 16:01
  • @RobertLongson according to this : https://github.com/svg/svgo/pull/818/commits/0f86c7028b132701ef599bb3280381a6dadb2d91 it's not a bug. I may have missed something in my config. Don't be so pessimistic – direxit Mar 17 '19 at 17:26
  • for now i edited plugin source : exports.params = { convertArcs: true }; in convertShapeToPath.js and it works so it doesn't sound to be a bug – direxit Mar 17 '19 at 17:38

1 Answers1

1

Finally it has to do with configuration object format that must be as follow :

"plugins": 
[{ 
    "convertShapeToPath": 
    { 
        "convertArcs": true 
    } 
}]
direxit
  • 367
  • 3
  • 18