smoothdeveloper / fable-elmish-lit-tailwind

A template for getting started with Fable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fable Elmish Lit Tailwind

A template for getting started with F# & Fable for web development.

Prerequisites

Getting Started

These commands will install the JavaScript and .NET dependencies. You only need to run these commands when you first start or when you update your dependencies.

npm install
dotnet tool restore
dotnet paket install

Everyday development

The below command starts the development server in watch mode.

npm run dev
# Note: To stop the dev server press Ctrl+C in the terminal

It starts 3 processes in parallel:

  • Fable, the F# to JavaScript compiler, will watch your F# files and recompile them automatically into the build directory.
  • Tailwind CSS provides a set of utility styles. In development mode, it will watch your code and recompile the CSS files as you add more classes.
  • Vite, JavaScript build tooling and development server. It watches the build directory and reloads the pages when the JavaScript changes.

By default, it will start here.

Building for production

The below command builds and bundles your F# and CSS into minified JavaScript in the dist directory. Any files in the public directory are also copied to dist.

npm run build

Understanding the config files

The following configuration files are used to support this project:

About

A template for getting started with Fable

License:MIT License


Languages

Language:F# 72.6%Language:JavaScript 16.2%Language:HTML 7.1%Language:TypeScript 3.3%Language:CSS 0.8%