1.0.1 • Published 5 years ago

@hypersay/jsx-transpiler v1.0.1

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
5 years ago

JSX Transpiler

A simple utility library to transform a JSX text to its equivalent React Javascript code.

It is designed to be used inside a node application.

Licensed under GPL v3 or later.

import { transpile } from '@hypersay/jsx-transpiler';

const source = `
  <div className="pinky">
    <p>Hello World!</p>
    <p>Today is {new Date()}</p>
  </div>
`;
transpile(source, { pragma: 'customFn', minified: true });
// 
// {
//     code: 'customFn("div",{className:"pinky"},customFn("p",null,"Hello World!"),customFn("p",null,"Today is ",new Date));'
//  }

Contact Cristian Dinu for details or use GitHub issues / PRs.

1.0.1

5 years ago

1.0.0

5 years ago