0.9.9 • Published 5 years ago
generic-jsx-transpiler v0.9.9
generic-jsx-transpiler
A library for transpiling JSX for use without React. Has no dependencies.
Checkout the webpack loader
Setup
npm install generic-jsx-transpiler --save-dev
Usage
Here is a bare bones example of API usage.
Proper usage examples can be found in the examples
directory.
node examples/hyperscript
to run Hyperscript example
const Parser = require('generic-jsx-transpiler').Parser;
const testJsx = `const ele = <div/>`
// This will simply output '<div/>' in place of any JSX blocks
function serialize(parsedComponent){
return `<div/>`;
};
// Our "serializer" just needs to have a 'serialize' function
const serializer = { serialize };
const parser = new Parser({ serializer });
const transpiledSource = parser.parse({
source: "",
// inputPath: "", // source param will override this
// async: false, // Will return promise if true
});
console.log(transpiledSource);
API
Coming soon
0.9.9
5 years ago
0.9.8
5 years ago
0.9.7
5 years ago
0.9.6
5 years ago
0.9.5
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.9.4
5 years ago
0.9.3
5 years ago
0.9.2
5 years ago
0.9.1
5 years ago
0.9.0
5 years ago
0.8.8
5 years ago
0.8.7
5 years ago
0.8.6
5 years ago
0.8.5
5 years ago
0.8.4
5 years ago
0.8.3
5 years ago
0.8.2
5 years ago
0.8.1
5 years ago
0.8.0
5 years ago