GitXplorerGitXplorer
f

babel-plugin-transform-react-createelement-to-jsx

public
54 stars
12 forks
3 issues

Commits

List of commits on branch master.
Unverified
9d1e57f506770d651e11151419f4b96cdad974cf

Added LICENSE file. fixes #4

fflying-sheep committed 8 years ago
Unverified
de84b4c71a7bc76ac9f4014ad29e8938c7d868ff

Fix loading plugin in test file (#2)

ffoxyblocks committed 8 years ago
Unverified
08ad8c0b55e7aa6cf17ce7fa3568470f76de05d4

fixed expression children

fflying-sheep committed 9 years ago
Unverified
c6d18be030e10237fd974e0b5bf7cbf21485a1ca

added npm badge

fflying-sheep committed 9 years ago
Unverified
3bfbf9d85e8b22471a213469244bd6abd673d37f

v1.0

fflying-sheep committed 9 years ago
Unverified
14e8913c420a04e4951979efbcf88ea5d13e8887

added support for children. everything works now!

fflying-sheep committed 9 years ago

README

The README file for this repository.

babel-plugin-transform-react-createelement-to-jsx build status npm version

Turn React.createElement calls back into JSX syntax.

This is useful for

  1. Converting projects that started out in the opinion that “we need no stinking compilers”
  2. Converting already-compiled JS into something maintainable (E.g. CJSX syntax → coffee-react-transformdecaffeinatereact-createelement-to-jsxJSX syntax)

Installation

$ npm install babel-plugin-transform-react-createelement-to-jsx

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": [ "transform-react-createelement-to-jsx" ]
}

Via CLI

$ babel --no-babelrc --plugins transform-react-createelement-to-jsx script.js

Via Node API

import babel from '@babel/core'

babel.transform('code', {
  plugins: ['transform-react-createelement-to-jsx'],
})

Development

If you want to help with corner cases, here are helpful resources: