0.3.5 • Published 6 months ago

svg-to-swiftui-core v0.3.5

Weekly downloads
5
License
MIT
Repository
github
Last release
6 months ago

SVG to SwiftUI Converter Core

Build Version Downloads/month License

This is the core transpiler code that you can use to convert raw SVG code into SwiftUI Shape struct that you can use directly in your SwiftUI Project.

Before we start

This package is written for JavaScript projects, so it's only meant to be used in a Node.js projects. If you just need to convert an SVG to SwiftUI Shape you should use this tool.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installing

All you need to do is to add this package to your project using following command:

npm i svg-to-swiftui-core

and then import into your project (ES6):

import { convert } from 'svg-to-swiftui-core'

Running the tests

You can run the tests by running following command:

npm test

Roadmap

  • SVG <path> element
    • Line commands
      • M
      • m
      • L
      • l
      • H
      • h
      • V
      • v
      • Z
      • z
    • Curve commands
      • C
      • c
      • S
      • s
      • Q
      • q
      • T
      • t
      • A
      • a
  • SVG <circle> element
  • SVG <rect> element
  • SVG <ellipse> element
  • Fill/stroke styling with colours
  • SVG <text> element
  • SVG <g> element with autmatic grouping into sub-paths in SwiftUI
  • SVG <polygon> element
  • SVG <polyline> element
  • AVG <arc> element
  • Automatic animation support

Built With

This project relies on following npm packages:

  • svg-parser - Parses raw SVG into a HAST (Hypertext Abstract Syntaxt Tree).
  • svg-pathdata - Parses svg path d attribute into a list of easily interpretable objects.

Contributing

Feel free to open an issue if your SVG file doesn't work or send a PR with our suggested changes!

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

0.3.5

6 months ago

0.3.3

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago