Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maomincoding/babel-plugin-jsx-to-mettle

This plugin converts JSX into Tagged Templates that work with amazed.js.
https://github.com/maomincoding/babel-plugin-jsx-to-mettle

amazed babel-plugin jsx

Last synced: about 1 month ago
JSON representation

This plugin converts JSX into Tagged Templates that work with amazed.js.

Awesome Lists containing this project

README

        

# Babel-plugin-jsx-to-mettle

This plugin converts JSX into Tagged Templates that work with mettle.js.

## Usage

In your Babel configuration (`.babelrc`, `babel.config.js`, `"babel"` field in package.json, etc), add the plugin:

```js
{
"plugins": [
["babel-plugin-jsx-to-mettle"]
]
}
```

### options

#### `tag=html`

By default, `babelPluginJsxToMettle` will process all Tagged Templates with a tag function named `html`. To use a different name, use the `tag` option in your Babel configuration:

```js
{"plugins":[
["babel-plugin-jsx-to-mettle", {
"tag": "html"
}]
]}
```

## License

[MIT](http://opensource.org/licenses/MIT)

Copyright (c) 2023-present, maomincoding