jsx

JSX parser for .jsx and .tsx files.

MIT License

Stars
6

jsx

JSX parser for .jsx and .tsx files.

This package is primarily used to rewrite JSX in JS files (think styled-jsx). This package does not parse JS, rather it finds JSX within JS.

Install

go get github.com/matthewmueller/jsx

Usage

input := `export default () => <h1>hello world</h1>`
ast, _ := jsx.Parse("input.jsx", input)
fmt.Println(ast.String())

Contributors

License

MIT

Package Rankings
Top 9.02% on Proxy.golang.org
Badges
Extracted from project README
Go Reference