Giter VIP home page Giter VIP logo

elm-proofread's Introduction

Elm Proofread.
This command-line tool runs your Elm documentation tests.

module Example exposing (add)

{-| Add two integers together.

    >>> add 1 2
    3

    >>> import Tuple
    >>> nine =
    ..>   Tuple.first ( 9, True )

    >>> 1.0
    ..>     |> round
    ..>     |> add nine
    add
        (round 5.0)
        5

-}
add : Int -> Int -> Int
add x y = x + y

How to use

# Proofread a single file
elm-proofread src/Main.elm

# Proofread stdin
cat src/Main.elm | elm-proofread

# Go to a directory, find all the Elm files and proofread all of them until one fails
( cd elm-project && \
  find . -name "*.elm" -print0 | \
  xargs -0 -n 1 -I % sh -c 'elm-proofread -- % || exit 255; echo "\n\n"' \
)

Built for Elm v0.19.
This command assumes the Elm REPL can be run and can locate an elm.json file.

How to install

elm-proofread's People

Contributors

icidasset avatar kofigumbs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

elm-proofread's Issues

Create static binaries

https://vaibhavsagar.com/blog/2018/01/03/static-haskell-nix/
https://github.com/nh2/static-haskell-nix
https://www.reddit.com/r/haskell/comments/9on8gi/is_there_an_easy_way_to_compile_static_binaries/

Notes from Elm Slack, regarding elm and elm-format binaries:

Off-the-mill Haskell binaries have few dependencies, the one of the Haskell runtime usually. Which is some basics + gmp.

I think they are compiled in Alpine using Docker.

elm 0.19.0 is a fully static binary (linked to musl libc), elm-format is not (like previous versions of elm).

Handle "expanding" input

Stuff like

func : Type

The Elm REPL will then input func automatically.
Need to figure out a way to handle that.
Same case statements and things like that.

Weird implementation detail:
The REPL will often leave an empty | line and when pushing enter at that point, it'll end the input block.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.