npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

elm-format-short

v0.10.3

Published

Install elm-format-short

Downloads

13

Readme

See https://github.com/nukisman/elm-format-short

elm-format-short formats your code like elm-format but:

  • Without extra blank lines
  • Without extra line breaks
  • Without extra indents
  • With shorter and better visual representations of case-of, if-then-else, let-in, etc.

elm-format-short formats Elm source code according to a standard set of rules in shorter way than elm-format.

The benefits of elm-format-short are same as of elm-format:

  • It makes code easier to write, because you never have to worry about minor formatting concerns while powering out new code.
  • It makes code easier to read, because there are no longer distracting minor stylistic differences between different code bases. As such, your brain can map more efficiently from source to mental model.
  • It makes code easier to maintain, because you can no longer have diffs related only to formatting; every diff necessarily involves a material change.
  • It saves your team time debating how to format things, because there is a standard tool that formats everything the same way.
  • It saves you time because you don't have to nitpick over formatting details of your code.

Plus benefits in contrast to elm-format:

  • It makes code easier to read, because you can see more code without scrolling.
  • It makes code easier to navigate, because you have not to scroll needless empty space by mouse or arrows on keyboard.
  • It makes code easier to write, because it is easier to read and easier to navigate.
  • It makes code easier to debug, because your lines of code commented out for debug purposes are not surrounded by needless blank lines above and below.
  • It saves your money, because you can still use your display. It not require you to buy new display with vertical resolution of 1000000000 pixels to see tons of blank lines.

Example formatting

See dreamwriter app by @rtfeldman:

Installation

npm i -g elm-format-short

IDE Integration

elm-format-short is CLI-compatible with elm-format. IDE Integration almost same as for elm-format.

JetBrains Integration

This is for WebStorm and other JetBrains IDEs.

  1. Install elm-format-short

  2. Install the Elm Language Plugin package.

  3. Install the File Watchers plugin (available in the plugin repository)

  4. Add a file watcher for .elm files with the settings as shown here.

  5. Set tab/indent size to 2 spaces as shown here