1 | # @svgr/hast-util-to-babel-ast
|
2 |
|
3 | [![Build Status](https://img.shields.io/travis/smooth-code/svgr.svg)](https://travis-ci.org/smooth-code/svgr)
|
4 | [![Version](https://img.shields.io/npm/v/@svgr/hast-util-to-babel-ast.svg)](https://www.npmjs.com/package/@svgr/hast-util-to-babel-ast)
|
5 | [![MIT License](https://img.shields.io/npm/l/@svgr/hast-util-to-babel-ast.svg)](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 hastToBabelAst 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
|