generated from finos/software-project-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add elm test support and docs on insiders builds (#398)
* Provide insiders channel * Changes * Add morphir elm test command * Update docs about insiders builds
- Loading branch information
1 parent
e2b45f0
commit 996ace1
Showing
13 changed files
with
158 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"name": "Morphir.Examples", | ||
"sourceDirectory": "src/elm", | ||
"exposedModules": ["Accounting.Book"] | ||
} | ||
"exposedModules": [ | ||
"Accounting.TAccount", | ||
"Accounting.Journal" | ||
] | ||
} |
17 changes: 0 additions & 17 deletions
17
examples/morphir-elm-projects/finance/src/elm/Morphir/Examples/Accounting/Book.elm
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
examples/morphir-elm-projects/finance/src/elm/Morphir/Examples/Accounting/Journal.elm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module Morphir.Examples.Accounting.Journal exposing (..) | ||
import Morphir.SDK.LocalDate exposing (LocalDate) | ||
|
||
type alias Journal = | ||
{ entries : List Entry | ||
, nextId : Int | ||
} | ||
|
||
type alias Entry = | ||
{ id : Int | ||
, date: LocalDate | ||
} |
25 changes: 25 additions & 0 deletions
25
examples/morphir-elm-projects/finance/src/elm/Morphir/Examples/Accounting/TAccount.elm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module Morphir.Examples.Accounting.TAccount exposing (..) | ||
|
||
type alias Amount = Int | ||
type alias AccountName = String | ||
|
||
type alias TAccount = | ||
{ name: AccountName | ||
, balance: Amount | ||
, debits: List Amount | ||
, credits: List Amount | ||
} | ||
|
||
make: AccountName -> Amount -> TAccount | ||
make name balance = | ||
{ name = name | ||
, balance = balance | ||
, debits = [] | ||
, credits = [] | ||
} | ||
|
||
entry: TAccount -> TAccount -> Amount -> ( TAccount, TAccount ) | ||
entry debitAccount creditAccount amount = | ||
( { debitAccount | debits = amount :: debitAccount.debits } | ||
, { creditAccount | credits = amount :: creditAccount.credits } | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters