UNPKG

736 BMarkdownView Raw
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
7Transforms HAST into Babel AST.
8
9## Install
10
11```
12npm install --save-dev @svgr/hast-util-to-babel-ast
13```
14
15## Usage
16
17```js
18import { parse } from 'svg-parser'
19import hastToBabelAst from '@svgr/hast-util-to-babel-ast'
20
21const hastTree = parse(`<svg></svg>`)
22
23const babelTree = hastToBabelAst(hastTree)
24```
25
26## License
27
28MIT