@@ -5,6 +5,7 @@ module Main
8+import Prelude hiding (init)
8import GHC.IO.Encoding (setLocaleEncoding, utf8)
9import GHC.IO.Encoding (setLocaleEncoding, utf8)
9import qualified Data.List as List
10import qualified Data.List as List
10import qualified Text.PrettyPrint.ANSI.Leijen as P
11import qualified Text.PrettyPrint.ANSI.Leijen as P
@@ -21,6 +22,7 @@ import Terminal.Args.Helpers
21import qualified Bump
22import qualified Bump
22import qualified Develop
23import qualified Develop
23import qualified Diff
24import qualified Diff
24import qualified Install
26import qualified Install
25import qualified Make
27import qualified Make
26import qualified Publish
28import qualified Publish
@@ -36,6 +38,7 @@ main =
36 do setLocaleEncoding utf8
38 do setLocaleEncoding utf8
37 complex intro outro
39 complex intro outro
@@ -71,6 +74,34 @@ outro =
84+ "Start an Elm project. It creates two files (elm.json and src/Main.elm)\
85+ \ and provides a couple links that explain how to get going with Elm."
88+ "The `init` command helps start Elm projects:"
92+ "It asks permission to create two files (elm.json and src/Main.elm) that are\
93+ \ common to all Elm projects. It also provides a couple links that explain what\
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."
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."
101+ Interface "init" (Common summary) details example noArgs initFlags Init.run
@@ -78,8 +109,8 @@ repl :: Interface
80 summary =
111 summary =
81− "Open up an interactive programming session. You can type in Elm\
112+ "Open up an interactive programming session. Type in Elm expressions\
82− \ expressions and it will tell you what they evaluate to."
113+ \ like (2 + 2) or (String.length \"test\") and see if they equal four!"
84 details =
115 details =
85 "The `repl` command opens up an interactive programming session:"
116 "The `repl` command opens up an interactive programming session:"
@@ -117,8 +148,8 @@ reactor :: Interface
119 summary =
150 summary =
120− "Easy way to get started with Elm. It shows a file viewer, and when you\
151+ "Compile code with a click. It opens a file viewer in your browser, and\
121− \ click on an Elm file, it compiles it and shows the result."
152+ \ when you click on an Elm file, it compiles and you see the result."
123 details =
154 details =
124 "The `reactor` command starts a local server on your computer:"
155 "The `reactor` command starts a local server on your computer:"
@@ -155,10 +186,6 @@ port_ =
155make :: Interface
186make :: Interface
159− "Compile files by hand. Once you get comfortable with Elm projects, you\
160− \ will probably want this level of control during development."
162 details =
189 details =
163 "The `make` command compiles Elm code into JS or HTML:"
190 "The `make` command compiles Elm code into JS or HTML:"
@@ -180,7 +207,7 @@ make =
180 |-- flag "report" Make.reportType "You can say --report=json to get error messages as JSON. This is only really useful if you are an editor plugin. Humans should avoid it!"
207 |-- flag "report" Make.reportType "You can say --report=json to get error messages as JSON. This is only really useful if you are an editor plugin. Humans should avoid it!"
181 |-- flag "docs" Make.docsFile "Generate a JSON file of documentation for a package. Eventually it will be possible to preview docs with `reactor` because it is quite hard to deal with these JSON files directly."
208 |-- flag "docs" Make.docsFile "Generate a JSON file of documentation for a package. Eventually it will be possible to preview docs with `reactor` because it is quite hard to deal with these JSON files directly."
183− Interface "make" (Common summary) details example (zeroOrMore elmFile) makeFlags Make.run
210+ Interface "make" Uncommon details example (zeroOrMore elmFile) makeFlags Make.run
@@ -190,10 +217,6 @@ make =
190install :: Interface
217install :: Interface
194− "Install <https://package.elm-lang.org> packages. Every project is\
195− \ independent, so you can use different versions in different projects."
197 details =
220 details =
198 "The `install` command fetches packages from <https://package.elm-lang.org> for\
221 "The `install` command fetches packages from <https://package.elm-lang.org> for\
199 \ use in your project:"
222 \ use in your project:"
@@ -220,7 +243,7 @@ install =
220 , require1 Install.Install package
243 , require1 Install.Install package
223− Interface "install" (Common summary) details example installArgs noFlags Install.run
246+ Interface "install" Uncommon details example installArgs noFlags Install.run