gnh1201 / welsonjs

WelsonJS - Build a Windows app on the Windows built-in JavaScript engine

Home Page:https://catswords.social/@catswords_oss

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[app] Add support ReasonML/Rescript

gnh1201 opened this issue · comments

Summary

We should keep the possibility open for other transpilable languages, just like WelsonJS supports TypeScript, CoffeeScript. I am planning to add support for ReasonML/Rescript (Formerly, BuckleScript).

Related Links

Rescript code example

let greet = (name) => "Hello " ++ name
let add = (x, y, z) => x + y + z

let main = (args) => {
  Js.log(greet("world!")) // "Hello world!"
  Js.log(add(1, 2, 3)) // 6
}

Result

>cscript app.js helloworld.re
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

[*] Hello world!