{"id":15060823,"url":"https://github.com/fsharp/tryfsharp","last_synced_at":"2025-10-05T16:17:24.216Z","repository":{"id":39551324,"uuid":"181733482","full_name":"fsharp/TryFSharp","owner":"fsharp","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-21T11:57:01.000Z","size":22625,"stargazers_count":26,"open_issues_count":38,"forks_count":15,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-30T09:41:44.456Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/fsharp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-16T17:10:48.000Z","updated_at":"2023-05-21T11:53:12.000Z","dependencies_parsed_at":"2022-08-25T22:01:08.986Z","dependency_job_id":null,"html_url":"https://github.com/fsharp/TryFSharp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsharp%2FTryFSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsharp%2FTryFSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsharp%2FTryFSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsharp%2FTryFSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fsharp","download_url":"https://codeload.github.com/fsharp/TryFSharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237236958,"owners_count":19277082,"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","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-09-24T23:04:58.603Z","updated_at":"2025-10-05T16:17:19.180Z","avatar_url":"https://github.com/fsharp.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fable REPL\n\n## Building locally\n\nTo develop the REPL locally, run the `WatchApp` FAKE target and then open `localhost:8080` in your browser.\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/repl2/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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsharp%2Ftryfsharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffsharp%2Ftryfsharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsharp%2Ftryfsharp/lists"}