meerk40t / svgelements

SVG Parsing for Elements, Paths, and other SVG Objects.
MIT License
132 stars 29 forks source link

[Suggestion] Split code into smaller files as a package... #148

Closed Sophist-UK closed 2 years ago

Sophist-UK commented 2 years ago

...for maintainability.

And build a single file version through a GH build action.

Suggested split:

  1. Core svgelements
  2. Shapes other than Paths or Text
  3. Paths inc. PathSegments
  4. Text
tatarize commented 2 years ago

Where the various elements are is where they sort of need to stay, it's a pretty massive breaking change to change them now.

This could be done in svgio since that's fine to make such changes. But, is pretty much a non-starter for svgelements.

Sophist-UK commented 2 years ago

It is not a breaking change to create a /src directory and put the separated parts into that and have a build process to create a single file from the parts.

And I know that Text is not a Shape - though it does have most (if not all) of the attributes of a shape i.e. stroke, stroke width, fill etc. But it has so much extra stuff I think we can understand why it isn't considered a Shape.

tatarize commented 2 years ago

Too breaking.

Sophist-UK commented 2 years ago

This is NOT a breaking change. I am suggesting that we have separate files and use a build process on every commit to master to bring them all together into a single file.

Users could either continue to use the single file or use the split files as they wish.

tatarize commented 2 years ago

Too breaking. Maybe for something like svgio but certainly not this project.

Sophist-UK commented 2 years ago

Ok.