Skip to content
fable-compilerPublic

About

Fable online REPL

Resources

Stars

68 stars

Watchers

6 watching

Forks

Repository files navigation

Fable REPL

Building locally

Requirements:

  • .NET SDK 10
  • Node.js 22

Start the development server:

./build.sh watch

Open http://localhost:8070/ in your browser.

Build the production site into src/App/dist:

./build.sh build

On Windows, use build.bat instead of ./build.sh.

Release

Releases are prepared by EasyBuild.ShipIt from Conventional Commits.

  1. Every push to main opens or updates a chore: release <version> pull request. It adds the new version to CHANGELOG.md and writes it to src/App/Version.fs.
  2. Merging that pull request publishes the site to GitHub Pages.

To update the Fable compiler, run the Update Fable NPM packages workflow manually. It updates @fable-org/fable-standalone, @fable-org/fable-metadata and the fable .NET tool, checks that the REPL still builds, and commits a fix: to main.

Add an example

  1. Add an .fs file to src/Examples/<folder>.
    • Core: the example uses no library set.
    • <set name>: the example needs that library set, for example React.
  2. Register the file in src/App/Examples.fs, under one of the categories.
  3. Optional: add a stylesheet to src/Examples/shared or next to the example, and reference it in the Css field.

The build fails if a file in src/Examples is not registered in src/App/Examples.fs, or if an example does not compile against its library set.

Add a library set

A library set is the group of packages the REPL code compiles against. The user picks one in the Libraries panel.

  1. Create src/Repl.Lib/<Name>/Repl.Lib.<Name>.fsproj, with a PackageReference for each package. Copy src/Repl.Lib/React as a starting point.
  2. Create src/Examples/<Name>/Examples.<Name>.fsproj. Copy src/Examples/React/Examples.React.fsproj and change the ProjectReference.
  3. Optional: add a description for the set in src/App/Presets.fs.

The build precompiles each library set.

About

Fable online REPL

Resources

Stars

68 stars

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages