Skip to content

ibeizhu/babel-plugin-jsx-to-schema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-jsx-to-schema

[Babel 6 Plugin] transform react jsx code to json schema

Image

Install

npm i babel-plugin-jsx-to-schema -S

Usage

const path = require('path');
const fs = require('fs');
const babel = require('babel-core');
const jsxToSchemaPlugin = require('babel-plugin-jsx-to-schema');

const code = fs.readFileSync(path.join('./', 'code.js'));

const result = babel.transform(code, {
    plugins: [jsxToSchemaPlugin],
});

Reference demo file for details

About

babel plugin jsx to schema object

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published