mirror of
https://github.com/ritz078/transform.git
synced 2026-11-25 02:10:02 +03:00
1 parent
d1a9a9ae85
commit
b00a4d4148
10 files changed
+141
-47
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import { jsxToJson } from "jsx-to-json";
|
||||
import stringify from "stringify-object";
|
||||
|
||||
export function transform(code) {
|
||||
try {
|
||||
return { value: stringify(eval(jsxToJson(code))), code: 1 };
|
||||
} catch (e) {
|
||||
return { value: e.message, code: 0 };
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
import { transform } from "babel-standalone";
|
||||
import convert from "babel-plugin-object-styles-to-template";
|
||||
import immutablePropsPlugin from "../utils/babel-plugin-js-to-immutable-prop-types";
|
||||
import registerPromiseWorker from "promise-worker/register";
|
||||
|
||||
registerPromiseWorker(
|
||||
|
||||
Reference in new issue
Block a user