项目作者: dawee

项目描述 :
Write OCaml through the Reason prism. Write ReasonML through the OCaml prism.
高级语言: TypeScript
项目地址: git://github.com/dawee/prisML.git
创建时间: 2019-04-14T06:08:43Z
项目社区:https://github.com/dawee/prisML

开源协议:

下载


PrisML

  1. _ _
  2. / | \
  3. OCaml ~~~> / | \ ~~~> ReasonML
  4. ReasonML <~~~ /___|___\ <~~~ OCaml

Write ReasonML through the OCaml prism.
Write OCaml through the ReasonML prism.

Description

PrisML is a VSCode extension for OCaml and ReasonML developers. It gives you the ability to work on both syntax using only the one you’re familiar with.

PrisML is just a layer over refmt, developped by the authors of facebook/reason.

Development

This project is a work in progress. Reading and writing using Reason syntax seems to work fine though.
To take a look at the extension:

  • Clone this project
  • Install the dependencies using yarn
  • Open the project using VSCode (make sure you have VSCode version >= 1.33.0)
  • In the menu, click on “Debug” -> “Start Debugging”
  • In the new VSCode window, open the command search bar (Ctrl-Shift-P or Cmd-Shift-P) and type “prisml”. You should see one command, click on it.
  • It will open the same UI it opens when you want to open a folder. So choose an OCaml project (personally I tested with glennsl/bs-jest)

You should see the chosen folder in VSCode explorer. The OCaml files should be seen with _ml.re extension instead of .ml. When you open them, you should see Reason syntax instead of OCaml.