on master help sign in
Switch the flags in `elm init` to match elm/browser programs
a792061Evan Czaplicki
ui/terminal/src/Init.hs+4−4
@@ -29,8 +29,8 @@ import qualified Reporting.Progress.Terminal as Terminal
29
29
30data Flags =
30data Flags =
31 Flags
31 Flags
32− { _embed :: Bool
32+ { _element :: Bool
33− , _fullscreen :: Bool
33+ , _document :: Bool
34 }
34 }
35
35
36
36
@@ -79,8 +79,8 @@ init :: Flags -> Task.Task ()
79init flags =
79init flags =
80 case flags of
80 case flags of
81 Flags False False -> download "sandbox"
81 Flags False False -> download "sandbox"
82− Flags True False -> download "embed"
82+ Flags True False -> download "element"
83− Flags False True -> download "fullscreen"
83+ Flags False True -> download "document"
84 Flags _ _ -> Task.throw $ Exit.Init E.ClashingFlags
84 Flags _ _ -> Task.throw $ Exit.Init E.ClashingFlags
85
85
86
86
ui/terminal/src/Main.hs+2−2
@@ -95,8 +95,8 @@ init =
95
95
96 initFlags =
96 initFlags =
97 flags Init.Flags
97 flags Init.Flags
98− |-- onOff "embed" "Switch Browser.sandbox to Browser.embed, making it easier to jump into making HTTP requests, generating random values, asking the time, etc."
98+ |-- onOff "element" "Initialize a Browser.element program, making it easier to jump into making HTTP requests, generating random values, asking the time, etc."
99− |-- onOff "fullscreen" "Switch Browser.sandbox to Browser.fullscreen, setting you up for a single-page app that controls the <title> and URL of the browser."
99+ |-- onOff "document" "Initialize a Browser.document program, allowing you to control the <title> and and <body> of the browser."
100 in
100 in
101 Interface "init" (Common summary) details example noArgs initFlags Init.run
101 Interface "init" (Common summary) details example noArgs initFlags Init.run
102
102