Fable documentation

Learn about how Fable works & how to use it

The following documentation pages are generated from the docs pages in the Fable repository on GitHub. Is anything unclear or missing? Help us make Fable better by contributing!

Fable version 1 documentation

The following documentation pages contain the most up-to-date information on getting started with the latest version of Fable and cover best practices for using Fable in typical projects.

Getting started

Start here! The page covers how to create your first Fable project. It explains the Fable template and gives a step-by-step guide for creating your first Fable project!

Prerequisites and editors

To get started with Fable, you will need a couple of things installed on your machine including Node, Yarn, Dotnet SDK and a suitable editor. This page explains why & how to get ready.

What is Fable server

Fable comes with a daemon that runs in the background and orchestrates the compilation process with Webpack. This page explains how the daemon works.

Latest blog posts

Check out the latest blog posts on Fable. It contains the most recent information, useful links, case studies and sample projects. If you want to keep up-to-date, this is the place to go.

Background information

The following pages contain more background on Fable including the .NET and F# library support and detailed info about the fable command line tool. Some of the information below still need to be updated to cover the latest version - you can help by sending us a pull request!

Compiling to JavaScript

The page covers all you need to get started with Fable. This includes the fable command parameters, fableconfig.json file, using Fable through Polyfill, modules, debugging, testing and more.

F# language and library compatibility

Provides details about the compatibility. This page explains how are primitive F# and CLR types compiled to JavaScript, which F# and CLR classes are supported and how they are translated.

Interacting with JavaScript

How to call JavaScript libraries? With Fable, you can use the dynamic operator and write jsObject?foo, you can use the Emit attribute, or define a foreign interface. There are a couple of special attributes too. Learn more here!

Fable architecture

Is it very easy to add features to Fable using plugins. The best example is the plugin to transform NUnit tests into Mocha. In order to understand the plugin system we'll review briefly how Fable works.

Fork me on GitHub