Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fabervitale/vite-elm-ts-template
A vite template to build apps with Elm and typescript
https://github.com/fabervitale/vite-elm-ts-template
elm elm-lang elm-ts-interop template typescript vite
Last synced: about 1 month ago
JSON representation
A vite template to build apps with Elm and typescript
- Host: GitHub
- URL: https://github.com/fabervitale/vite-elm-ts-template
- Owner: FaberVitale
- License: mit
- Created: 2024-02-12T11:29:09.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-17T11:12:53.000Z (10 months ago)
- Last Synced: 2024-11-20T20:14:46.218Z (about 1 month ago)
- Topics: elm, elm-lang, elm-ts-interop, template, typescript, vite
- Language: Elm
- Homepage: https://vite-elm-ts-template.netlify.app/
- Size: 159 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
vite-elm-ts-template
## Description
A [vite](https://vitejs.dev/) template for building apps with [elm](https://elm-lang.org/) and [typescript](https://www.typescriptlang.org/).
### Features
- [Hot Module Replacement](https://vitejs.dev/guide/features#hot-module-replacement) thanks to [vite](https://vitejs.dev/) and [vite-plugin-elm](https://github.com/hmsk/vite-plugin-elm).
- Vite static asset handling provided by [vite-plugin-elm](https://github.com/hmsk/vite-plugin-elm).
- Elm tooling installation via [elm-tooling](https://elm-tooling.github.io/elm-tooling-cli/).
- [CI pipeline](.github/workflows/ci.yaml).
- [Netlify CD](./netlify.toml).
- Elm linting provided by [elm-review](https://package.elm-lang.org/packages/jfmengels/elm-review/latest/).
- Configured [Elm unit test](./tests/CounterTest.elm) environment.
- Automatic Ports and Flags type generation thanks to [elm-ts-interop](https://elm-ts-interop.com/how-it-works).
- Code linting and formatting on precommit (see [config](.lintstagedrc.mjs)) provided by [lintstaged](https://github.com/lint-staged/lint-staged) and [husky](https://typicode.github.io/husky/).## Demo
https://vite-elm-ts-template.netlify.app/
## Development guide
## Quick start
Either [open it on your browser (codesandbox)](https://codesandbox.io/p/devbox/github/FaberVitale/vite-elm-ts-template)
or clone the repository.### Scripts
#### Install project
```bash
npm i
```#### Dev server
```bash
npm run dev
```#### Build
```bash
npm run build
```#### Generate Ports and Flags types
```bash
npm run generate:elm-ts
```#### run tests
```bash
npm run test
```#### format
```bash
npm run fmt
```#### run linters
```bash
npm run lint:elm && npm run lint:ts
```### Git hooks
On pre-commit, changes are formatted and linted using [Husky](https://typicode.github.io/husky/) and [lint-staged](https://github.com/lint-staged/lint-staged).
See [.lintstagedrc.mjs](.lintstagedrc.mjs) for more details.### CI
- [CI workflow](.github/workflows/ci.yaml)
---
## License
[MIT](./LICENSE)