|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
732 bytes
|
| Rev | Line | |
|---|
| [9af201e] | 1 | # @svgr/hast-util-to-babel-ast
|
|---|
| 2 |
|
|---|
| 3 | [](https://travis-ci.org/smooth-code/svgr)
|
|---|
| 4 | [](https://www.npmjs.com/package/@svgr/hast-util-to-babel-ast)
|
|---|
| 5 | [](https://github.com/smooth-code/svgr/blob/master/LICENSE)
|
|---|
| 6 |
|
|---|
| 7 | Transforms HAST into Babel AST.
|
|---|
| 8 |
|
|---|
| 9 | ## Install
|
|---|
| 10 |
|
|---|
| 11 | ```
|
|---|
| 12 | npm install --save-dev @svgr/hast-util-to-babel-ast
|
|---|
| 13 | ```
|
|---|
| 14 |
|
|---|
| 15 | ## Usage
|
|---|
| 16 |
|
|---|
| 17 | ```js
|
|---|
| 18 | import { parse } from 'svg-parser'
|
|---|
| 19 | import toBabelAST from '@svgr/hast-util-to-babel-ast'
|
|---|
| 20 |
|
|---|
| 21 | const hastTree = parse(`<svg></svg>`)
|
|---|
| 22 |
|
|---|
| 23 | const babelTree = hastToBabelAst(hastTree)
|
|---|
| 24 | ```
|
|---|
| 25 |
|
|---|
| 26 | ## License
|
|---|
| 27 |
|
|---|
| 28 | MIT
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.