Fable bindings for Flyd, a minimalistic but powerful, modular, functional reactive programming library.
Flyd can be used with the excellent Meiosis pattern as a building block for next gen elmish like architecture.
WIP: Not yet tested
This example aims to showcase how to create custom Fable bindings for a JS library.
The initial bindings in Flyd.fs
were created via ts2fable using the Flyd index.d.ts TypeScript definitoons file.
Checkout other sample apps at fable2-samples
- dotnet SDK 2.1 or higher
- Paket to manage F# dependencies
- node.js with npm
- An F# editor like Visual Studio, Visual Studio Code with Ionide or JetBrains Rider.
yarn install
- Windows:
.paket/paket.exe install
- Non-Windows:
mono .paket/paket.exe install
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
npm start
to compile and watch with fable-splitter.
Alternatively:
npm run build
- same but outputs javascript to/out
.
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
App.fsporj
- add source paths here. Notepaket.references
is referenced here.App.fs
- starting point.Util/File.fs
- sample lib file.