A tool of generating TypeScritp type.
The useState hook is used in this project to manage states instead of redux because useState is suitable for small projects. The Tailwind and code highlighter help to beautify the UI. To ensure the code quality, eslint is configured and testings are implemented as well. And the continuous integration is based on GitHub Actions.
- Run
npm installoryarnto install dependencies. npm startoryarn startto run this application in the development mode. Open http://localhost:3000 to view it in the browser.
type-generator
|
|---src
| | types.d.ts //defined necessary types.
| | common.ts //common functions are implemented here.
| | App.tsx //state management and layout.
| | App.test.tsx //testing work.
| |
| |
| |--components
| | Type.tsx //design the target type, consists of properties.
| | Property.tsx //design the individual property.
| | Code.tsx //display the generated code string.
| | Elements.tsx //fundamental customized elements, such as button and input, etc.
The doc is created via React Styleguidist, run yarn styleguide or just check the files under the folder docs.
Some essential tests are conducted based on React testing library in the file App.test.tsx.
The GitHub Actions is configured in the file under .github/workflows.
