Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/terezka/elm-diff
A parser for `git diff` in Elm. Also allows for highlighting of Elm / JSON files.
https://github.com/terezka/elm-diff
diff elm
Last synced: 20 days ago
JSON representation
A parser for `git diff` in Elm. Also allows for highlighting of Elm / JSON files.
- Host: GitHub
- URL: https://github.com/terezka/elm-diff
- Owner: terezka
- License: bsd-3-clause
- Created: 2021-02-04T17:07:41.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-04T22:07:53.000Z (almost 4 years ago)
- Last Synced: 2024-05-09T07:12:13.957Z (6 months ago)
- Topics: diff, elm
- Language: Elm
- Homepage: https://terezka.github.io/elm-diff
- Size: 132 KB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elm-diff
A parser for `git diff` in Elm. Also allows for highlighting of Elm / JSON files.
## Usage
Use `Diff.fromString` to parse `git diff` output.
```
import Diff exposing (Diff)parsed : Result Diff.Error Diff
parsed =
Diff.fromString originaloriginal : String
original =
"""\ndiff --git a/src/Hello.elm b/src/Hello.elm\nnew file mode 100644\nindex 0000000..5482d42\n--- /dev/null\n+++ b/src/Hello.elm\n@@ -0,0 +1,4 @@\n+module Hello exposing (..)\n+\n+\n+hello = 1\n\ No newline at end of file"""
```## Install
```
$ elm install terezka/elm-diff
```