elm-format
vite-elm-template
Our great sponsors
elm-format | vite-elm-template | |
---|---|---|
5 | 4 | |
1,306 | 120 | |
- | - | |
5.6 | 4.4 | |
about 1 year ago | 2 months ago | |
Haskell | Elm | |
BSD 3-clause "New" or "Revised" License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
elm-format
-
Using the Builder Pattern for Elm Components
Keep in mind for the pipes, many in Elm, whether they’re using elm-format or not, will break the pipes to a different line in case there are many of them. For some, they find this more readable (I’m in that group). Let’s show an example of that using the same pattern to design a Paginator, the row of numbered buttons that allow you to move between pages of data.
-
Elm 2021, a year in review
9ᵗʰ - Aaron VonderHaar releases a new version of elm-format.
-
Setting up an Elm project in 2022
Unlike Javascript, Elm has an official Style Guide for how Elm code should be structured. In addition, some formatting is built into the language itself, such as requiring indents of four spaces. This removes a major point of contention within teams. In addition, the community has put together a wonderful tool called elm-format. Similar to Prettier, this utility can be used to ensure that all Elm code matches the official style guide. Unlike Prettier, there is no custom configuration, meaning once again that your team can focus on writing code instead of what kind of quotes to use.
-
Tips/Resources on starting with ELM
Regarding user experience and tooling, I'd suggest you use an editor that is compatible with the elm language server: https://github.com/elm-tooling/elm-language-server VSCode is a good default choice. You'll also be interested in other toolings. elm-json (https://github.com/zwilias/elm-json) is great to simply install and uninstall dependencies. elm-format (https://github.com/avh4/elm-format) is a must since most active people in the community use it, and simply viewing your code being moved around on save is a good sign that you wrote something with a good syntax.
-
Artyom's Haskell toolbox — a long list of tools/libraries I use
Take for example the debate about 2 vs 4 spaces. People often (but not always) have very strong opinions about this, yet it is clear that this formatting choice will probably not be the dominant factor in the success of a project. A quick google search also reveals no scientific research in this field. Concerning surveys, I found this interesting (from a survey on 2 vs 4 spaces in elm-format) as one datapoint:
vite-elm-template
-
Learning Elm because of work into Vue/React but why is the code so ugly?
After that point I started looking into how Elm works from the web dev perspective with resources like Elm in Action and Frontend Masters courses (first working in ellie-app-for-elm-dev then upgrading to vite-elm-template).
- Easy Questions / Beginners Thread (Week of 2022-08-08)
-
Utilizing Elm in a Web Worker
Using vanilla HTML and JS is nice, but most of the time at work or in larger projects we're using some sort of build tooling to have a more streamlined experience. I'm personally a big fan of Vite, the frontend tooling solution by the creator of Vue. I maintain a Vite template for building Elm applications, which utilized the excellent Elm plugin for Vite to achieve hot module reload and directly importing our .elm files into our Javascript.
-
Setting up an Elm project in 2022
This was a template I created to scratch my own itch. As a Vue developer, I love working with Vite, and really wanted a base template for Vite that I could use to build Elm applications. vite-elm-template is a basic Vite template intended to get you started writing in Elm without having to spend time configuring everything yourself. Unlike elm-pages or elm-spa, it's not a framework of any sort. If you want to bring in single-page application features, or other functionalities, you will have to build those in yourself. That said, it's perfect for getting started with a basic environment.
What are some alternatives?
elm-review - Analyzes Elm projects, to help find mistakes before your users find them.
elm-test-rs - Fast and portable executable to run your Elm tests
elm-ui - What if you never had to write CSS again?
node-test-runner - Runs elm-test suites from Node.js. Get it with npm install -g elm-test
hasqlator-mysql - Hasqlator is a haskell sql generator library
elm-webpack-loader - Webpack loader for the Elm programming language.
bytestring - An efficient compact, immutable byte string type (both strict and lazy) suitable for binary or 8-bit character data.
browser - Create Elm programs that run in browsers!
package.elm-lang.org - website for browsing packages and exploring documentation
ellie - The Elm Live Editor
elm-architecture-tutorial - How to create modular Elm code that scales nicely with your app
elm-vanilla-js-web-worker