Opinionated template for building Elm web applications using Vite, Tailwind CSS, and daisyUI.
- To learn more about Elm, check out Elm's official homepage.
- For more information about Vite JS, check out Vite JS's official homepage.
- For more information about Tailwind CSS, check out Tailwind CSS's official homepage.
- For more information about daisyUI, check out daisyUI's official homepage.
- vite-plugin-elm: compile an Elm module with hot-module reload.
- vite-plugin-webfont-dl: inject Bunny Fonts to improve website's performance.
- vite-plugin-compression: compress resources to improve website's performance.
- vite-plugin-imagemin: compress image assets to improve website's performance.
- elm-tooling: command line program that manages your Elm tools.
- elm-format: format Elm source code according to the official Elm Style Guide.
- elm-test: write unit and fuzz tests for Elm code.
- elm-review: analyze Elm projects and find mistakes before your users find them.
Shortlist of Elm packages that could be beneficial. Included as suggestions:
- hmsk/elm-vite-plugin-helper: provides helpers for using vite-plugin-elm.
- tesk9/accessible-html: makes writing accessible websites easier.
- lattyware/elm-fontawesome: native Font Awesome integration and support.
To remove them feel free:
- not to use them
- run
npm run review
This templates uses TailwindCSS 4 with the vite, typography, and daisyUI
plugins.
"The most popular, free, and open-source Tailwind CSS component library".
daisyUI: a Tailwind CSS classes component library, aiming to work on all frameworks. The CSS nature of daisyUI makes Elm integration possible and a breeze to use. Examples included:
- The whole page is a daisyUI hero section
- The counter buttons are daisyUI buttons
- Basic daisyUI 'light' and 'dark' theming/coloring (via Elm ports)
- fnm: easily and consistently manage Node.
.nvimrcset to use latestlts/jod.
- This template provides both recommended extensions and workspace settings.
- VS Code will prompt you to install them when you open the workspace for the first time.
- @max_hoffmann amazing Tailwind CSS in Elm for VSCode changes are implemented.
To clone this repository, devoid of .git, you can either use npx degit or
install tiged locally and run degit without npx. YMMV.
Tiged is a fork that addresses a number of issues, and should be preferred. To install it, run:
npm uninstall -g degit
npm install -g tigedMost likely, npx degit would invoke degit. A locally installed binary makes
sure you are running tiged instead.
- Clone the template:
- using npx:
npx degit andreacfromtheapp/elm_vite_tailwind_template my-elm-app - local binary:
degit andreacfromtheapp/elm_vite_tailwind_template my-elm-app
- using npx:
- Enter the project:
cd my-elm-app - Install dependencies:
npm install - Start developing:
npm run dev
| script | action |
|---|---|
| postinstall | elm-tooling install |
| dev | vite |
| prebuild | elm-tooling install |
| build | vite build |
| preview | npm run build; vite preview |
| review | elm-review --fix-all |
| test | elm-test-rs |
Contributions and constructive criticism are welcome. If you think I'm overdoing it, feel free to discuss. I'm still experimenting with this, as a learning opportunity, and I strive to improve the template as much as possible.
This templated was inspired by Lindsay K Wardell's template.