https://github.com/karimaziev/quicktype
Generate typescript interfaces in Emacs.
https://github.com/karimaziev/quicktype
emacs emacs-package quicktype typescript
Last synced: about 2 months ago
JSON representation
Generate typescript interfaces in Emacs.
- Host: GitHub
- URL: https://github.com/karimaziev/quicktype
- Owner: KarimAziev
- License: gpl-3.0
- Created: 2022-11-07T16:43:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-09T13:01:19.000Z (over 1 year ago)
- Last Synced: 2025-01-07T18:21:14.981Z (over 1 year ago)
- Topics: emacs, emacs-package, quicktype, typescript
- Language: Emacs Lisp
- Homepage:
- Size: 739 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+AUTHOR: Karim Aziiev
#+EMAIL: karim.aziiev@gmail.com
* quicktype
Emacs integration for [[https://quicktype.io/][quicktype]].
[[./demo.gif]]
** Requirements
+ Emacs >= 27.1
+ transient
+ quicktype
** Installation
Firstly ensure that you have installed ~quicktype~ program.
#+begin_src shell
npm i -g quicktype
#+end_src
*** Manual
Download the source code and put it wherever you like and add the directory to the load path:
#+begin_src elisp :eval no
(add-to-list 'load-path "/path/to/quicktype)
(require 'quicktype)
#+end_src
*** With use-package and straight
#+begin_src elisp :eval no
(use-package quicktype
:straight (:repo "KarimAziev/quicktype"
:type git
:host github)
:commands (quicktype))
#+end_src
** Usage
*** ~M-x quicktype~
Dispatch transient popup with available arguments and execute quicktype.
By default it will generate types from region or current buffer. You can also specify file, URL, or data directory (option =--src=).
** Customization
*** ~quicktype-src-modes-alist~
Alist of quicktype languages and modes.
*** ~quicktype-default-switches~
Alist of default quicktype switches.
*** ~quicktype-lang-modes-alist~
Alist of quicktype languages and modes.
*** ~quicktype-url-reader~
~url~ reader should three args - prompt, initial input and history.