Giter Club home page Giter Club logo

fablestarter's Introduction

FableStarter

Fable Logo

An Elmish F# Fable template which uses Tailwind for styling, the Vite bundler, the Vitest test runner and Storybook for Component-Driven Development (CDD).

Install pre-requisites

You'll need to install the following pre-requisites in order to use the Fable Starter template:

Getting Started with FableStarter

Use degit to set up the template:

npx degit rastreus/FableStarter <your project name>

Run the following commands from the root of the project directory:

  1. cd <your project name>

  2. dotnet tool restore

  3. dotnet paket install

  4. yarn install

  5. dotnet build shared/src/Shared.fsproj

  6. dotnet build api/src/Api./fsproj

  7. dotnet run --project api/src/Api.fsproj

  8. yarn dev:fable

  9. Open a brower to http://localhost:5173

Running Tests

Tests can be run by Vitest in its watch mode. Open a separate terminal instance and run yarn test.

Check out Fable.Expect to learn more about defining tests.

More testing resources:

Running Storybook

Similar to tests, Storybook can run in its watch mode in a separate terminal instance with yarn storybook.

Check out the Storybook Docs and their Storybook for React tutorial to learn more about writing stories for components.


Other Templates

If this template isn't what you're wanting, there are other templates. Some only set up a frontend Fable project and then others are full-stack web app templates that include a F# backend:

Additional templates can be found at https://fable.io/resources.html#Templates

fablestarter's People

Contributors

rastreus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

darrix stjordanis

fablestarter's Issues

Steps from the README don't work

After dotnet build:

 ~/Documents/FableStarter  main ?1 ▓▒░ dotnet build                                                                                                                              ░▒▓ ✔  19s  12:15:13 
Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  Restored /Users/delneg/Documents/FableStarter/FableStarter.fsproj (in 3.01 sec).
/Users/delneg/Documents/FableStarter/src/App.fs(24,16): error FS0039: The type 'CssClasses<./src/index.css,0,node,tailwind-process.js tailwind.config.js>' does not define the field, constructor or member 'w-full'. [/Users/delneg/Documents/FableStarter/FableStarter.fsproj]
/Users/delneg/Documents/FableStarter/src/App.fs(25,16): error FS0039: The type 'CssClasses<./src/index.css,0,node,tailwind-process.js tailwind.config.js>' does not define the field, constructor or member 'h-screen'. [/Users/delneg/Documents/FableStarter/FableStarter.fsproj]
/Users/delneg/Documents/FableStarter/src/App.fs(26,16): error FS0039: The type 'CssClasses<./src/index.css,0,node,tailwind-process.js tailwind.config.js>' does not define the field, constructor or member 'bg-fable-blue-500'. [/Users/delneg/Documents/FableStarter/FableStarter.fsproj]
/Users/delneg/Documents/FableStarter/src/App.fs(27,16): error FS0039: The type 'CssClasses<./src/index.css,0,node,tailwind-process.js tailwind.config.js>' does not define the field, constructor or member 'dark:bg-fable-blue-900'. [/Users/delneg/Documents/FableStarter/FableStarter.fsproj]
/Users/delneg/Documents/FableStarter/src/App.fs(28,16): error FS0039: The type 'CssClasses<./src/index.css,0,node,tailwind-process.js tailwind.config.js>' does not define the field, constructor or member 'flex'. [/Users/delneg/Documents/FableStarter/FableStarter.fsproj]
/Users/delneg/Documents/FableStarter/src/App.fs(29,16): error FS0039: The type 'CssClasses<./src/index.css,0,node,tailwind-process.js tailwind.config.js>' does not define the field, constructor or member 'flex-col'. [/Users/delneg/Documents/FableStarter/FableStarter.fsproj]
/Users/delneg/Documents/FableStarter/src/App.fs(30,16): error FS0039: The type 'CssClasses<./src/index.css,0,node,tailwind-process.js tailwind.config.js>' does not define the field, constructor or member 'justify-center'. [/Users/delneg/Documents/FableStarter/FableStarter.fsproj]
/Users/delneg/Documents/FableStarter/src/App.fs(31,16): error FS0039: The type 'CssClasses<./src/index.css,0,node,tailwind-process.js tailwind.config.js>' does not define the field, constructor or member 'items-center'. [/Users/delneg/Documents/FableStarter/FableStarter.fsproj]

Questiion about debugging :)

Hi! feel free to close the issue right away! I just hoped to get some tips on how to enable debugging in F# files with Vite and VsCode ;) Any hints?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.