matthewmueller / jsx

JSX parser for .jsx and .tsx files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jsx

Go Reference

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

About

JSX parser for .jsx and .tsx files.

License:MIT License


Languages

Language:Go 97.7%Language:Makefile 2.1%Language:JavaScript 0.2%