darrix / fable-getting-started

Template for getting started with Fable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fable Getting Started

This is the simplest Fable application you can make: it is a frontend web application with an empty page that writes Hello from Fable to the console.

Requirements

Installation

To compile the project, run the following commands

npm install
npm run build

npm install will install dependencies from npm which is the Node.js equivalent of dotnet's Nuget registry. These dependencies include the Fable compiler itself as it is distributed to npm to make compilation workflow as simple as possible.

npm run build will then start building the project by invoking webpack which is responsible of orchestrating the compilation process.

After npm run build finished running, the generated javascript will be bundled in a single file called main.js located in the dist directory along with an existing index.html page that references that script file.

Development mode

While developing the application, you don't want to recompile the application every time you make a change. Instead of that, you can start the compilation process in development mode which will watch changes you make in the file and re-compile automatically really fast:

npm install
npm start

If you already ran npm install then you don't need to run it again. npm start will start the developement mode by invoking webpack-dev-server: the webpack development server that starts a lightweight local server at http://localhost:8080 from which the server will serve the client application

About

Template for getting started with Fable

License:MIT License


Languages

Language:F# 80.0%Language:JavaScript 20.0%