Skip to content

Commit

Permalink
Ensure repo is in a state where the Elm build can succeed
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianReeves committed May 31, 2024
1 parent 5d6388a commit eab7893
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
18 changes: 15 additions & 3 deletions .moon/tasks/tag-elm.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
fileGroups:
elm-sources:
- 'src/**/*.elm'
- 'elm.json'
elmSources:
- "src"
tasks:
elm-lint:
platform: bun
command: |
yarn exec elm-format @dirs(elmSources) @files(elmSources) --validate --yes
elm-format @dirs(elmSources) @files(elmSources) --validate --yes
inputs:
- "@files(elmSources)"

elm-format:
platform: bun
command: |
yarn exec elm-format @dirs(elmSources) @files(elmSources) --yes
elm-format @dirs(elmSources) @files(elmSources) --yes
inputs:
- "@files(elmSources)"
- "@files(elmSources)"
elm-library-make:
description: "Compile an Elm library. Note: This amounts mostly to type-checking, since libraries don't compile to anything."
platform: bun
command: |
elm make --output=/dev/null
inputs:
- "@files(elm-sources)"
7 changes: 6 additions & 1 deletion moon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,18 @@ tasks:
inputs:
- '@globs(sources)'
deps:
- target: "~:check-elm-docs"
- target: "~:elm-build"
check:
command: 'cargo check --workspace'
inputs:
- '@globs(sources)'
deps:
- target: "~:check-elm-docs"
elm-build:
inputs: []
deps:
- target: "~:elm-library-make"
- target: "~:check-elm-docs"
ensure-elm-docs-dir:
command: 'mkdir -p @out(0)'
outputs:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"scripts": {
"build": "moon run :build",
"clean": "moon run clean",
"elm-build": "moon run elm-build",
"pruge": "moon run pruge",
"build:verify-elm-package": "zig build verify-elm-package --summary all",
"check-elm-docs": "moon run check-elm-docs",
Expand Down

0 comments on commit eab7893

Please sign in to comment.