{"id":20720269,"url":"https://github.com/zaaack/elmish-react-demo","last_synced_at":"2025-06-24T20:07:10.689Z","repository":{"id":74324696,"uuid":"111480892","full_name":"zaaack/elmish-react-demo","owner":"zaaack","description":"A playground project","archived":false,"fork":false,"pushed_at":"2018-04-09T06:19:08.000Z","size":202,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T07:52:47.809Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zaaack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-11-21T01:06:08.000Z","updated_at":"2018-04-16T03:33:49.000Z","dependencies_parsed_at":"2023-07-07T17:00:39.263Z","dependency_job_id":null,"html_url":"https://github.com/zaaack/elmish-react-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zaaack/elmish-react-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaaack%2Felmish-react-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaaack%2Felmish-react-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaaack%2Felmish-react-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaaack%2Felmish-react-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zaaack","download_url":"https://codeload.github.com/zaaack/elmish-react-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaaack%2Felmish-react-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261749186,"owners_count":23203990,"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-11-17T03:19:52.405Z","updated_at":"2025-06-24T20:07:10.655Z","avatar_url":"https://github.com/zaaack.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fable.Elmish.React Template\n\nThis template can be used to generate a simple web app with [Fable](http://fable.io/) and [Elmish](https://fable-elmish.github.io/).\nYou can find more templates by searching `Fable.Template` packages in [Nuget](https://www.nuget.org).\n\n## Requirements\n\n* [dotnet SDK](https://www.microsoft.com/net/download/core) 2.0.0 or higher\n* [node.js](https://nodejs.org) 4.8.2 or higher\n* npm5: JS package manager\n\nAlthough is not a Fable requirement, on macOS and Linux you'll need [Mono](http://www.mono-project.com/) for other F# tooling like Paket or editor support.\n\n## Editor\n\nThe project can be used by editors compatible with the new .fsproj format, like VS Code + [Ionide](http://ionide.io/), Emacs with [fsharp-mode](https://github.com/fsharp/emacs-fsharp-mode) or [Rider](https://www.jetbrains.com/rider/). **Visual Studio for Mac** is also compatible but in the current version the package auto-restore function conflicts with Paket so you need to disable it: `Preferences \u003e Nuget \u003e General`.\n\n## Installing the template\n\nIn a terminal, run `dotnet new -i Fable.Template.Elmish.React::*` to install or update the template to latest version.\n\n\u003e In some shells you many need quotations: `dotnet new -i \"Fable.Template.Elmish.React::*\"`. If you use dotnet SDK 2, you should only need to type `dotnet new -i Fable.Template.Elmish.React`.\n\n## Creating a new project with the template\n\nIn a terminal, run `dotnet new fable` to create a project in the current directory. Type `dotnet new fable -n MyApp` instead to create a subfolder named `MyApp` and put the new project there.\n\n\u003e The project will have the name of the directory. You may get some issues if the directory name contains some special characters like hyphens\n\n## Building and running the app\n\n* Install JS dependencies: `npm install`\n* **Move to `src` folder**: `cd src`\n* Install F# dependencies: `dotnet restore`\n* Start Fable daemon and [Webpack](https://webpack.js.org/) dev server: `dotnet fable npm-start`\n* In your browser, open: http://localhost:8080/\n\n\u003e `dotnet fable yarn-start` (or `npm-start`) is used to start the Fable daemon and run a script in package.json concurrently. It's a shortcut of `yarn-run [SCRIP_NAME]`, e.g. `dotnet fable yarn-run start`.\n\nIf you are using VS Code + [Ionide](http://ionide.io/), you can also use the key combination: Ctrl+Shift+B (Cmd+Shift+B on macOS) instead of typing the `dotnet fable yarn-start` command. This also has the advantage that Fable-specific errors will be highlighted in the editor along with other F# errors.\n\nAny modification you do to the F# code will be reflected in the web page after saving. When you want to output the JS code to disk, run `dotnet fable yarn-build` (or `npm-build`) and you'll get a minified JS bundle in the `public` folder.\n\n## Project structure\n\n### Paket\n\n[Paket](https://fsprojects.github.io/Paket/) is the package manager used for F# dependencies. It doesn't need a global installation, the binary is included in the `.paket` folder. Other Paket related files are:\n\n- **paket.dependencies**: contains all the dependencies in the repository.\n- **paket.references**: there should be one such a file next to each `.fsproj` file.\n- **paket.lock**: automatically generated, but should committed to source control, [see why](https://fsprojects.github.io/Paket/faq.html#Why-should-I-commit-the-lock-file).\n- **Nuget.Config**: prevents conflicts with Paket in machines with some Nuget configuration.\n\n\u003e Paket dependencies will be installed in the `packages` directory. See [Paket website](https://fsprojects.github.io/Paket/) for more info.\n\n### npm\n\n- **package.json**: contains the JS dependencies together with other info, like development scripts.\n- **package-lock.json**: is the lock file created by npm5.\n\n\u003e JS dependencies will be installed in `node_modules`. See [npm](https://www.npmjs.com/) website for more info.\n\n### Webpack\n\n[Webpack](https://webpack.js.org) is a bundler, which links different JS sources into a single file making deployment much easier. It also offers other features, like a static dev server that can automatically refresh the browser upon changes in your code or a minifier for production release. Fable interacts with Webpack through the `fable-loader`.\n\n- **webpack.config.js**: is the configuration file for Webpack. It allows you to set many things: like the path of the bundle, the port for the development server or [Babel](https://babeljs.io/) options. See [Webpack website](https://webpack.js.org) for more info.\n\n### F# source files\n\nThe template only contains two F# source files: the project (.fsproj) and a source file (.fs) in `src` folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaaack%2Felmish-react-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaaack%2Felmish-react-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaaack%2Felmish-react-demo/lists"}