From 0cab2d4dceb27b8a55a1545131f7bd2e8864cadb Mon Sep 17 00:00:00 2001 From: Alex Sieland Date: Thu, 22 Aug 2024 11:14:38 -0400 Subject: [PATCH 1/2] Clean up readme to reference handling elm tests as well as an alternative way to run elm-format from the project root directory --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c222e60f6..7e30a3623 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ For your convience, you can run the morphir-runtime tests using the following co ``` -#### Formatting Code +#### Formatting Scala Code Code needs to be formatted according to `scalafmt` rules. To run `scalafmt` on all the source code using: @@ -148,6 +148,22 @@ or in watch mode to reformat changed files: ./mill -w mill.scalalib.scalafmt.ScalafmtModule/reformatAll __.sources ``` +#### Formatting Elm Code + +The evaluator tests utilize elm code. To reformat the elm code for those tests: + +```bash +elm-format --elm-version=0.19 examples/morphir-elm-projects/evaluator-tests/src/Morphir/Examples/App/*.elm +``` + +If you don't have elm-format installed, you can either install it through npm or a different package manager like brew: + +```bash +npm install -g elm-format +``` + +Alternatively, this can be done directly via `npm run format`, which is documented [here](https://github.com/finos/morphir-scala/blob/main/examples/morphir-elm-projects/evaluator-tests/ReadMe.md) + #### IntelliJ Setup for Windows If you are using IntelliJ IDEA to edit morphir-scala's Scala code, you can create the @@ -199,6 +215,10 @@ or in watch mode to reformat changed files: .\mill -i -w mill.scalalib.scalafmt.ScalafmtModule/reformatAll __.sources ``` +#### Elm Tests + +Documentation for the elm tests are located at [examples/morphir-elm-projects/evaluator-tests/ReadMe.md](https://github.com/finos/morphir-scala/blob/main/examples/morphir-elm-projects/evaluator-tests/ReadMe.md) + ### Roadmap Watch for updates. From 113b6f6db5403c234f464520a2ead2d770eedad0 Mon Sep 17 00:00:00 2001 From: Alex Sieland Date: Thu, 22 Aug 2024 11:18:06 -0400 Subject: [PATCH 2/2] move --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7e30a3623..ee7e6a1ce 100644 --- a/README.md +++ b/README.md @@ -201,6 +201,10 @@ or in watch mode: .\mill -i -w __.test ``` +#### Elm Tests + +Documentation for the elm tests are located at [examples/morphir-elm-projects/evaluator-tests/ReadMe.md](https://github.com/finos/morphir-scala/blob/main/examples/morphir-elm-projects/evaluator-tests/ReadMe.md) + #### Formatting Code Code needs to be formatted according to `scalafmt` rules. To run `scalafmt` on all the source code using: @@ -215,10 +219,6 @@ or in watch mode to reformat changed files: .\mill -i -w mill.scalalib.scalafmt.ScalafmtModule/reformatAll __.sources ``` -#### Elm Tests - -Documentation for the elm tests are located at [examples/morphir-elm-projects/evaluator-tests/ReadMe.md](https://github.com/finos/morphir-scala/blob/main/examples/morphir-elm-projects/evaluator-tests/ReadMe.md) - ### Roadmap Watch for updates.