{"id":19542565,"url":"https://github.com/fable-compiler/repl","last_synced_at":"2025-10-05T18:15:50.825Z","repository":{"id":38843192,"uuid":"141253952","full_name":"fable-compiler/repl","owner":"fable-compiler","description":"Fable online REPL","archived":false,"fork":false,"pushed_at":"2025-06-24T15:11:10.000Z","size":122579,"stargazers_count":66,"open_issues_count":26,"forks_count":38,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-06-24T16:26:08.951Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://fable.io/repl","language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fable-compiler.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-17T08:06:18.000Z","updated_at":"2025-06-24T15:09:53.000Z","dependencies_parsed_at":"2023-02-15T07:01:24.440Z","dependency_job_id":"518942f1-c0eb-4b80-a406-dd3bb9ffcf2c","html_url":"https://github.com/fable-compiler/repl","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/fable-compiler/repl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fable-compiler%2Frepl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fable-compiler%2Frepl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fable-compiler%2Frepl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fable-compiler%2Frepl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fable-compiler","download_url":"https://codeload.github.com/fable-compiler/repl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fable-compiler%2Frepl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278495222,"owners_count":25996544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T03:15:06.350Z","updated_at":"2025-10-05T18:15:50.786Z","avatar_url":"https://github.com/fable-compiler.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fable REPL\n\n[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/fable-compiler/repl)\n\n## Building locally\n\nTo develop the REPL locally:\n\n1. `dotnet fsi build.fsx -p WatchApp`\n2. Open `http://localhost:5173/` in your browser\n\n## Release\n\nTo release a new version of the REPL you can use `dotnet fsi build.fsx -t Release`. This will create a new tag and push it to Github.\n\nTips: If you want to release after a Fable update, please go to [REPL - Actions](https://github.com/fable-compiler/repl/actions/workflows/update_fable_packages.yml) and run the `Update Fable NPM packages` workflow manually.\n\nThis will update the `package.json` file with the latest Fable packages and commit to the `main` branch which will trigger a new release.\n\n## How to add a sample\n\nTo add a sample, you need to add an .fs file to the `public/samples/Samples.fsproj` project (and a corresponding .html file if necessary), then update `public/samples/samples.json`. This file is used to generate the samples menu in the browser. [This commit](https://github.com/fable-compiler/repl/commit/860243166459e10e47919815dffcc94ddbbd73b7) is a good example of adding a sample (pun intended).\n\n\u003e If you just want to update on the existing samples, you can do it directly using Github UI and send a PR automatically.\n\nYou can add three types of entries:\n\n- Category: Adds a title entry to the menu\n- SubCategory: Adds an entry under a category, and make it collapsible\n- MenuItem: Adds a classic item which when clicked will load the sample into the REPL\n\n### Category\n\n```json\n{\n    \"type\": \"category\",\n    \"label\": \"Learn Fable\",\n    \"children\": [\n    ]\n}\n```\n\n- label: Will be displayed as the title of the category\n- children: A list of `SubCategory` or `MenuItem`\n\n### SubCategory\n\n```json\n{\n    \"type\": \"sub-category\",\n    \"label\": \"Interop\",\n    \"children\": [\n    ]\n}\n```\n\n- label: Will be displayed as the title of the SubCategory\n- children: A list of `MenuItem`\n\n### MenuItem\n\n```json\n{\n    \"type\": \"menu-item\",\n    \"label\": \"Basic canvas\",\n    \"fsharpCode\": \"basic-canvas/basic_canvas.fs\",\n    \"htmlCode\": \"basic-canvas/basic_canvas.html\"\n}\n```\n\n- label: Name to display in the menu item\n- fsharpCode: Relative url of the F# code\n- htmlCode (*optional field*): Relative url of the html code\n- cssCode (*optional field*): Relative url of the css code\n\nAll the urls for `fsharpCode`, `htmlCode` are relative to the `public/samples` folder.\n\n## How to build Fable.Repl.Lib\n\nBuilding the library for the repl is a bit convoluted an involves an additional repository: ncave's fork of the F# compiler. This is used to generate .dlls containing only metada so they're lighter to load in the repl. We need to perform two steps:\n\n1. Generate the Fable.Repl.Lib.dll (and Browser bindings) assembly that will be used by Fable standalone in the repl (for compilation and analysis)\n2. Generate the JS files for Fable.Repl.Lib that will be loaded by the compiled JS code in the playground\n\nThe first step is the most complicated as it requires using a custom build of the F# compiler (in `export` branch of ncave's fsharp fork). Most of the steps to do this are automated in the `src/Export/build.sh` script.\n\nThe second step can be run with the `BuildLib` FAKE target.\n\n\u003e If you want to use fable-standalone (and base metadata) from a local Fable repo in a sibling folder enable the `LOCAL_PKG` env var as in `LOCAL_PKG=1 dotnet fsi build.fsx -p BuildLib`\n\nOne important thing to remember is **public inlined functions won't work** with precompiled libs so please refrain from using them in Fable.Repl.Lib source.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffable-compiler%2Frepl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffable-compiler%2Frepl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffable-compiler%2Frepl/lists"}