Skip to content

Commit ddb26e1

Browse files
committed
Prep for check-elm-pages
1 parent 3717206 commit ddb26e1

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

extra/Lamdera/CLI.hs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{-# LANGUAGE OverloadedStrings #-}
22

3-
module Lamdera.CLI (live, login, check, deploy, reset, annotate, eval) where
3+
module Lamdera.CLI (live, login, check, deploy, reset, checkElmPages, annotate, eval) where
44

55
import Text.Read (readMaybe)
66
import qualified Text.PrettyPrint.ANSI.Leijen as P
@@ -13,6 +13,7 @@ import qualified Lamdera.CLI.Login
1313
import qualified Lamdera.CLI.Check
1414
import qualified Lamdera.CLI.Deploy
1515
import qualified Lamdera.CLI.Reset
16+
import qualified Lamdera.CLI.CheckElmPages
1617
import qualified Lamdera.CLI.Annotate
1718
import qualified Lamdera.CLI.Interpreter
1819

@@ -122,6 +123,20 @@ reset =
122123
Terminal.Command "reset" (Common summary) details example noArgs noFlags Lamdera.CLI.Reset.run
123124

124125

126+
checkElmPages :: Terminal.Command
127+
checkElmPages =
128+
let
129+
summary =
130+
"Compile an elm-pages project and type-check all Data types for wire compatibility."
131+
132+
details =
133+
"This is an elm-pages specific command."
134+
135+
example =
136+
reflow
137+
"It will type-check all Data types for wire compatibility"
138+
in
139+
Terminal.Command "check-elm-pages" (Common summary) details example noArgs noFlags Lamdera.CLI.CheckElmPages.run
125140

126141

127142
annotate :: Terminal.Command

terminal/src/Main.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ main =
4444
, make
4545
, repl
4646
, Lamdera.CLI.reset
47+
, Lamdera.CLI.checkElmPages
4748
, Lamdera.CLI.annotate
4849
, Lamdera.CLI.eval
4950
-- , reactor

test/Test.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import Make (Flags(..))
1717
import qualified Lamdera.Compile
1818
import qualified Lamdera.Evaluate
1919
import qualified Lamdera.CLI.Check
20+
import qualified Lamdera.CLI.CheckElmPages
2021
import qualified Ext.Query.Canonical
2122

2223
import Develop
@@ -205,6 +206,9 @@ liveReloadLive = do
205206
-- "withDebug"
206207

207208

209+
-- target = do
210+
-- Dir.withCurrentDirectory "/Users/mario/dev/projects/elmcraft" $ Lamdera.CLI.CheckElmPages.run () ()
211+
208212

209213

210214
all =

0 commit comments

Comments
 (0)