Opinionated template for building Elm web applications using Vite, Tailwind CSS, and daisyUI.
Shortlist of Elm packages that could be beneficial. Included as suggestions:
To remove them feel free:
npm run review
The official plugins are installed by default:
"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:
.nvimrc
set to use latest lts/iron
.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 tiged
Most likely, npx degit
would invoke degit
. A locally installed
binary makes sure you are running tiged
instead.
npx degit gacallea/elm_vite_tailwind_template my-elm-app
degit gacallea/elm_vite_tailwind_template my-elm-app
cd my-elm-app
npm install
npm run dev
script | action |
---|---|
postinstall | elm-tooling install |
dev | vite |
prebuild | elm-tooling install |
build | vite build |
preview | npm run build; vite preview |
standard | standard --fix src/*/.js |
markdown | standard-markdown --fix src/*/.md |
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 repo relies on pre-commit-ci to make sure all suggested coding standards are enforced with git hooks. You could also install pre-commit locally to apply the same configuration locally.
This templated was inspired by Lindsay K Wardell's template.