babel-plugin-react-primitives-svg
A babel plugin that transforms SVG imports into react-primitives-svg compatible components.
Last updated a year ago by hermanya .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install babel-plugin-react-primitives-svg 
SYNC missed versions from official npm registry.

babel-plugin-react-primitives-svg

FOSSA Status

A babel plugin that transforms SVG imports into react-primitives-svg-compatible primitives.

???? This is super BETA ????

This is my first dip into the babel plugin pool, so any help testing or developing would be greatly appreciated.

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": [
    "babel-plugin-react-primitives-svg"
  ]
}

Options

  • verbose - Log level (boolean, default: false)
  • defaultWidth - Default pixel width for SVG (string or number, default: 100%)
  • defaultHeight - Default pixel height for SVG (string or number, default: 100%)
  • ...inherited options from babel-plugin-react-sketchapp-svg

Example:

{
  "plugins": [
    [
      "babel-plugin-react-primitives-svg",
      {
        "defaultWidth": 32,
        "defaultHeight": 32,
        "svgo": {
          "plugins": [
            {
              "removeAttrs": { "attrs": "(data-name)" }
            },
            {
              "cleanupIDs": true
            }
          ]
        }
      }
    ]
  ]
}

License

FOSSA Status

Current Tags

  • 2.0.2                                ...           latest (a year ago)

4 Versions

  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.0.0-beta4                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 6
Dependencies (7)
Dev Dependencies (11)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |