Skip to content

Latest commit

 

History

History
68 lines (39 loc) · 2.13 KB

README.md

File metadata and controls

68 lines (39 loc) · 2.13 KB

Fable superrouter bindings: WIP

Fable bindings for Superouter

Why?

Superouter can be used with the excellent Meiosis pattern as a building block for next gen elmish like architecture.

Status

WIP: Not yet tested

Overview

This example aims to showcase how to create custom Fable bindings for JS libraries.

The bindings were all mainly created from typescript definitions via ts2fable

Checkout other sample apps at fable2-samples

Requirements

Building and running the app

install JS dependencies

  • yarn install

install F# dependencies

  • Windows: .paket/paket.exe install or yarn run paket
  • Non-Windows: mono .paket/paket.exe install or yarn run paket:mono

Alternatively install paket as a global .NET tool

$ dotnet tool install --tool-path ".paket" Paket --add-source https://api.nuget.org/v3/index.json --framework netcoreapp2.1

With defaults, try simply: $ dotnet tool install Paket

In this case, make sure that the install location of paket is in your system PATH, see: dotnet-tool-install

Start and run

  • npm start to compile and watch with fable-splitter.

Alternatively:

  • npm run build - same but outputs javascript to /out.

Add F# Modules

While fable-splitter is watching with one of above npm commands:

  • Add nuget ModuleName to paket.dependencies and run paket install command above.
  • Add ModuleName to src/paket.references

Source Files

  • App.fsporj - add source paths here. Note paket.references is referenced here.
  • App.fs - starting point.
  • Util/File.fs - sample lib file.