mirror of
https://github.com/ritz078/transform.git
synced 2026-11-27 19:29:19 +03:00
1 parent
c93caa6765
commit
b746e2837b
7 files changed
+56
-9
No files matched your search
@@ -136,6 +136,15 @@
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "shakyShane",
|
||||
"name": "Shane Osbourne",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1643522?v=4",
|
||||
"profile": "https://medium.com/@shakyShane",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -48,6 +48,7 @@
|
||||
"is-svg": "^2.1.0",
|
||||
"json-schema-faker": "^0.5.0-rc11",
|
||||
"json-schema-to-typescript": "^4.6.5",
|
||||
"json-ts": "^1.6.4",
|
||||
"lodash": "^4.17.4",
|
||||
"next": "4.2.3",
|
||||
"nprogress": "^0.2.0",
|
||||
|
||||
@@ -3,10 +3,11 @@ import dynamic from "next/dynamic";
|
||||
import Layout from "../components/Layout";
|
||||
import ConversionPanel from "../components/ConversionPanel";
|
||||
import defaultText from "../utils/dummy-json";
|
||||
import transform from "transform-json-types";
|
||||
import { json2ts } from "json-ts";
|
||||
import PoweredBy from "../components/PoweredBy";
|
||||
|
||||
export default class Json2Ts extends PureComponent {
|
||||
getTransformedValue = code => transform(code);
|
||||
getTransformedValue = code => json2ts(code, { flow: true });
|
||||
|
||||
render() {
|
||||
return (
|
||||
@@ -22,6 +23,7 @@ export default class Json2Ts extends PureComponent {
|
||||
url={this.props.url}
|
||||
prettifyRightPanel={false}
|
||||
/>
|
||||
<PoweredBy pathname={this.props.url.pathname} />
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,13 +3,11 @@ import dynamic from "next/dynamic";
|
||||
import Layout from "../components/Layout";
|
||||
import ConversionPanel from "../components/ConversionPanel";
|
||||
import defaultText from "../utils/dummy-json";
|
||||
import transform from "transform-json-types";
|
||||
import { json2ts } from "json-ts";
|
||||
import PoweredBy from "../components/PoweredBy";
|
||||
|
||||
export default class Json2Ts extends PureComponent {
|
||||
getTransformedValue = code =>
|
||||
transform(code, {
|
||||
lang: "typescript"
|
||||
});
|
||||
getTransformedValue = code => json2ts(code);
|
||||
|
||||
render() {
|
||||
return (
|
||||
@@ -25,6 +23,7 @@ export default class Json2Ts extends PureComponent {
|
||||
url={this.props.url}
|
||||
prettifyRightPanel={false}
|
||||
/>
|
||||
<PoweredBy pathname={this.props.url.pathname} />
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
|
||||
| [<img src="https://avatars3.githubusercontent.com/u/5389035?v=4" width="100px;"/><br /><sub><b>Ritesh Kumar</b></sub>](http://riteshkr.com)<br />[📖](https://github.com/ritz078/transform-www/commits?author=ritz078 "Documentation") [💻](https://github.com/ritz078/transform-www/commits?author=ritz078 "Code") [🤔](#ideas-ritz078 "Ideas, Planning, & Feedback") [👀](#review-ritz078 "Reviewed Pull Requests") | [<img src="https://avatars2.githubusercontent.com/u/47542?v=4" width="100px;"/><br /><sub><b>Florian Gilcher</b></sub>](http://asquera.de)<br />[💻](https://github.com/ritz078/transform-www/commits?author=skade "Code") | [<img src="https://avatars1.githubusercontent.com/u/20063?v=4" width="100px;"/><br /><sub><b>Pascal Hertleif</b></sub>](http://pascalhertleif.de/)<br />[💻](https://github.com/ritz078/transform-www/commits?author=killercup "Code") | [<img src="https://avatars3.githubusercontent.com/u/534610?v=4" width="100px;"/><br /><sub><b>Lado Lomidze</b></sub>](http://landish.github.io)<br />[💻](https://github.com/ritz078/transform-www/commits?author=Landish "Code") | [<img src="https://avatars1.githubusercontent.com/u/13787614?v=4" width="100px;"/><br /><sub><b>Mattia Manzati</b></sub>](https://github.com/mattiamanzati)<br />[💻](https://github.com/ritz078/transform-www/commits?author=mattiamanzati "Code") | [<img src="https://avatars3.githubusercontent.com/u/12202757?v=4" width="100px;"/><br /><sub><b>Mohammad Rajabifard</b></sub>](https://tarino.ir)<br />[🤔](#ideas-morajabi "Ideas, Planning, & Feedback") [💻](https://github.com/ritz078/transform-www/commits?author=morajabi "Code") | [<img src="https://avatars0.githubusercontent.com/u/3108160?v=4" width="100px;"/><br /><sub><b>Raathigeshan Kugarajan</b></sub>](http://raathigesh.com/)<br />[💻](https://github.com/ritz078/transform-www/commits?author=Raathigesh "Code") |
|
||||
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
||||
| [<img src="https://avatars2.githubusercontent.com/u/5554486?v=4" width="100px;"/><br /><sub><b>Gyandeep Singh</b></sub>](https://gyandeeps.com)<br />[💻](https://github.com/ritz078/transform-www/commits?author=gyandeeps "Code") | [<img src="https://avatars2.githubusercontent.com/u/1128849?v=4" width="100px;"/><br /><sub><b>Matt Holt</b></sub>](https://matt.life)<br />[💻](https://github.com/ritz078/transform-www/commits?author=mholt "Code") | [<img src="https://avatars0.githubusercontent.com/u/2767425?v=4" width="100px;"/><br /><sub><b>sreenivas alapati</b></sub>](https://medium.com/@sreenivas)<br />[💻](https://github.com/ritz078/transform-www/commits?author=cg-cnu "Code") | [<img src="https://avatars2.githubusercontent.com/u/1761758?v=4" width="100px;"/><br /><sub><b>Boris Cherny</b></sub>](https://performancejs.com)<br />[💻](https://github.com/ritz078/transform-www/commits?author=bcherny "Code") | [<img src="https://avatars0.githubusercontent.com/u/448?v=4" width="100px;"/><br /><sub><b>Mark Lussier</b></sub>](http://www.twitter.com/intabulas)<br />[💻](https://github.com/ritz078/transform-www/commits?author=intabulas "Code") | [<img src="https://avatars3.githubusercontent.com/u/383212?v=4" width="100px;"/><br /><sub><b>Brice BERNARD</b></sub>](https://github.com/brikou)<br />[💻](https://github.com/ritz078/transform-www/commits?author=brikou "Code") | [<img src="https://avatars2.githubusercontent.com/u/1174278?v=4" width="100px;"/><br /><sub><b>Satyajit Sahoo</b></sub>](https://twitter.com/@satya164)<br />[💻](https://github.com/ritz078/transform-www/commits?author=satya164 "Code") |
|
||||
| [<img src="https://avatars3.githubusercontent.com/u/1643522?v=4" width="100px;"/><br /><sub><b>Shane Osbourne</b></sub>](https://medium.com/@shakyShane)<br />[💻](https://github.com/ritz078/transform-www/commits?author=shakyShane "Code") |
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
|
||||
+6
-2
@@ -90,13 +90,17 @@ export const categorizedRoutes = [
|
||||
{
|
||||
label: "JSON to Flow Types",
|
||||
path: "/json-to-flow-types",
|
||||
desc: "An online REPL for converting JSON to generate Flow Types."
|
||||
desc: "An online REPL for converting JSON to generate Flow Types.",
|
||||
packageName: "json-ts",
|
||||
packageUrl: "https://github.com/shakyShane/json-ts"
|
||||
},
|
||||
{
|
||||
label: "JSON to Typescript Interface",
|
||||
path: "/json-to-ts-interface",
|
||||
desc:
|
||||
"An online REPL for converting JSON to generate TypeScript Interface."
|
||||
"An online REPL for converting JSON to generate TypeScript Interface.",
|
||||
packageName: "json-ts",
|
||||
packageUrl: "https://github.com/shakyShane/json-ts"
|
||||
},
|
||||
{
|
||||
label: "JSON to MobX-State-Tree Model",
|
||||
|
||||
@@ -3010,6 +3010,10 @@ get-stdin@^4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
|
||||
|
||||
get-stdin@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398"
|
||||
|
||||
get-stream@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
|
||||
@@ -3493,6 +3497,10 @@ immediate@~3.0.5:
|
||||
version "3.0.6"
|
||||
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
|
||||
|
||||
immutable@^3.8.1:
|
||||
version "3.8.2"
|
||||
resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.2.tgz#c2439951455bb39913daf281376f1530e104adf3"
|
||||
|
||||
import-from@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/import-from/-/import-from-2.1.0.tgz#335db7f2a7affd53aaa471d4b8021dee36b7f3b1"
|
||||
@@ -3976,6 +3984,17 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
|
||||
|
||||
json-ts@^1.6.4:
|
||||
version "1.6.4"
|
||||
resolved "https://registry.yarnpkg.com/json-ts/-/json-ts-1.6.4.tgz#e4423b8ccdb3069306f4727d6a579790675abbd0"
|
||||
dependencies:
|
||||
get-stdin "^5.0.1"
|
||||
immutable "^3.8.1"
|
||||
minimist "^1.2.0"
|
||||
needsquotes "^1.0.0"
|
||||
transducers-js "^0.4.174"
|
||||
typescript "^2.3.2"
|
||||
|
||||
json5@^0.5.0, json5@^0.5.1:
|
||||
version "0.5.1"
|
||||
resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
|
||||
@@ -4582,6 +4601,10 @@ ncp@~2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3"
|
||||
|
||||
needsquotes@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/needsquotes/-/needsquotes-1.0.0.tgz#f54f90ff2ad3f5c1fc90236804639f849b924fad"
|
||||
|
||||
negotiator@0.6.1:
|
||||
version "0.6.1"
|
||||
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9"
|
||||
@@ -6796,6 +6819,10 @@ tough-cookie@~2.3.0, tough-cookie@~2.3.3:
|
||||
dependencies:
|
||||
punycode "^1.4.1"
|
||||
|
||||
transducers-js@^0.4.174:
|
||||
version "0.4.174"
|
||||
resolved "https://registry.yarnpkg.com/transducers-js/-/transducers-js-0.4.174.tgz#d5862c10eff4be3d3322abf6bb742e30f1bb6fc4"
|
||||
|
||||
transform-css-to-js@^0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/transform-css-to-js/-/transform-css-to-js-0.1.1.tgz#20fd40b137849555c063aa55f168680ad00724bb"
|
||||
@@ -6906,6 +6933,10 @@ typedarray@^0.0.6:
|
||||
version "0.0.6"
|
||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
|
||||
typescript@^2.3.2:
|
||||
version "2.6.2"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4"
|
||||
|
||||
ua-parser-js@^0.7.9:
|
||||
version "0.7.17"
|
||||
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac"
|
||||
|
||||
Reference in new issue
Block a user