Skip to content

A simple npm package to transpile random JSX code to Javascript

Notifications You must be signed in to change notification settings

cdinu/jsx-transpiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A simple npm package to transpile random JSX code to Javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published