Name: samples-electron
Owner: Fable
Description: Fable bindings and samples for Github Electron
Created: 2016-08-16 15:43:26.0
Updated: 2018-03-04 22:39:06.0
Pushed: 2018-03-05 16:45:13.0
Homepage: null
Size: 5851
Language: F#
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This repository contains samples to show how to create a Github Electron cross-platform desktop app using F# and Fable.
At the time of writing there's only one simple sample. More to come!
npm comes bundled with node.js, but we recommend to use at least npm 5. If you have npm installed, you can upgrade it by running
npm install -g npm
.
Although is not a Fable requirement, on macOS and Linux you'll need Mono for other F# tooling like Paket or editor support.
The project can be used by editors compatible with the new .fsproj format, like VS Code + Ionide, Emacs with fsharp-mode or 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 > Nuget > General
.
In the commands below, yarn is the tool of choice. If you want to use npm, just replace
yarn
bynpm
in the commands.
yarn install
dotnet restore
yarn start
yarn run launch
The first two steps are only necessary the first time or whenever the dependencies change.
The app window will be refreshed when you modify any file in the Renderer project. For production, run yarn run build
to get optimized JS code.
As all Electron apps, the sample is split in two parts:
index.html
.