神刀安全网

Fable: F# to JavaScript Transpiler

Functional-first programming

Fable brings together the power of the F# compiler and Babel to make JavaScript a true backend for F#. It works directly on F# source code, no compilation needed.

JavaScript you can be proud of

Fable optimizes F# code to generate as clean JavaScript as possible. It comes with a tiny core library (less than 10KB minified and gzipped) and no other runtime.

Tools for the 21 st century

Fable uses Babel to generate source maps. It is compatible with Babel plugins and JavaScript tools, like Webpack, and organizes code using ES6 modules.

Easy integration

Fable supports most of the F# core library and a bit of .NET BCL. It interacts seamlessly with other JavaScript libraries. As a bonus, it compiles NUnit tests to Mocha!

Getting started with Fable

A beta version has been released to npm ! You can install and run it just by typing:

npm install -g fable-compiler fable path/to/your/file.fsx

Note the package name is fable-compiler while the command is just fable . You must have F# 4.0 and node 4.4 or newer installed in your computer. You can find latest F# installation instructions on fsharp.org ( mac , windows ). To use the latest version, you can compile Fable from source on GitHub .

Do you have 10 minutes? See Fable in action!

Watch a brief introduction to Fable by the author of Fable. Learn how to configure Fable, run the Fable samples including Mario game and client-server React.js demo compiled using WebPack.

Fable: F# to JavaScript Transpiler

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Fable: F# to JavaScript Transpiler

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址