@@ -1473,6 +1473,7 @@ data Make
1473 | MakeAppNeedsFileNames
1473 | MakeAppNeedsFileNames
1474 | MakePkgNeedsExposing
1474 | MakePkgNeedsExposing
1475 | MakeMultipleFilesIntoHtml
1475 | MakeMultipleFilesIntoHtml
1476 | MakeNonMainFilesIntoJavaScript ModuleName.Raw [ModuleName.Raw]
1477 | MakeNonMainFilesIntoJavaScript ModuleName.Raw [ModuleName.Raw]
1477 | MakeCannotBuild BuildProblem
1478 | MakeCannotBuild BuildProblem
1478 | MakeBadGenerate Generate
1479 | MakeBadGenerate Generate
@@ -1507,20 +1508,105 @@ makeToReport make =
1508 MakeAppNeedsFileNames ->
1509 MakeAppNeedsFileNames ->
1509 Help.report "NO INPUT" Nothing
1510 Help.report "NO INPUT" Nothing
1510− "What should I make though? I need a specific file like this:"
1511+ "What should I make though? I need specific files like:"
1511− [ D.indent 4 $ D.green "elm make src/Main.elm"
1513+ [ D.indent 4 $ D.green "elm make src/Main.elm"
1514+ , D.indent 4 $ D.green "elm make src/This.elm src/That.elm"
1512− , D.reflow
1516+ , D.reflow $
1513− "However many files you give, I will create one JS file out of them."
1517+ "I recommend reading through https://guide.elm-lang.org for guidance on what to\
1518+ \ actually put in those files!"
1516 MakePkgNeedsExposing ->
1521 MakePkgNeedsExposing ->
1517− error "TODO MakePkgNeedsExposing"
1522+ Help.report "NO INPUT" Nothing
1523+ "What should I make though? I need specific files like:"
1525+ [ D.indent 4 $ D.green "elm make src/Main.elm"
1526+ , D.indent 4 $ D.green "elm make src/This.elm src/That.elm"
1529+ "You can also entries to the \"exposed-modules\" list in your elm.json file, and\
1530+ \ I will try to compile the relevant files."
1519 MakeMultipleFilesIntoHtml ->
1533 MakeMultipleFilesIntoHtml ->
1520− error "TODO MakeMultipleFilesIntoHtml"
1534+ error "MakeMultipleFilesIntoHtml"
1537+ Help.docReport "NO MAIN" Nothing
1539+ "When producing an HTML file, I require that the given file has a `main` value.\
1540+ \ That way I have something to show on screen!"
1543+ "Try adding a `main` value to your file? Or if you just want to verify that this\
1544+ \ module compiles, switch to --output=/dev/null to skip the code gen phase\
1547+ "Adding a `main` value can be as brief as adding something like this:"
1549+ [ D.fillSep [D.cyan "import","Html"]
1551+ , D.fillSep [D.green "main","="]
1552+ , D.indent 2 $ D.fillSep [D.cyan "Html" <> ".text",D.dullyellow "\"Hello!\""]
1555+ "From there I can create an HTML file that says \"Hello!\" on screen. I recommend\
1556+ \ looking through https://guide.elm-lang.org for more guidance on how to fill in\
1557+ \ the `main` value."
1560+ MakeNonMainFilesIntoJavaScript m ms ->
1563+ Help.report "NO MAIN" Nothing
1565+ "When producing a JS file, I require that the given file has a `main` value. That\
1566+ \ way Elm." ++ ModuleName.toChars m ++ ".init() is definitely defined in the\
1570+ "Try adding a `main` value to your file? Or if you just want to verify that this\
1571+ \ module compiles, switch to --output=/dev/null to skip the code gen phase\
1574+ "Adding a `main` value can be as brief as adding something like this:"
1576+ [ D.fillSep [D.cyan "import","Html"]
1578+ , D.fillSep [D.green "main","="]
1579+ , D.indent 2 $ D.fillSep [D.cyan "Html" <> ".text",D.dullyellow "\"Hello!\""]
1582+ "Or use https://package.elm-lang.org/packages/elm/core/latest/Platform#worker to\
1583+ \ make a `main` with no user interface."
1522− MakeNonMainFilesIntoJavaScript _ _ ->
1586+ _:_ ->
1523− error "TODO MakeNonMainFilesIntoJavaScript"
1587+ Help.report "NO MAIN" Nothing
1589+ "When producing a JS file, I require that given files all have `main` values.\
1590+ \ That way functions like Elm." ++ ModuleName.toChars m ++ ".init() are\
1591+ \ definitely defined in the resulting file. I am missing `main` values in:"
1593+ [ D.indent 4 $ D.red $ D.vcat $ map D.fromName (m:ms)
1595+ "Try adding a `main` value to them? Or if you just want to verify that these\
1596+ \ modules compile, switch to --output=/dev/null to skip the code gen phase\
1599+ "Adding a `main` value can be as brief as adding something like this:"
1601+ [ D.fillSep [D.cyan "import","Html"]
1603+ , D.fillSep [D.green "main","="]
1604+ , D.indent 2 $ D.fillSep [D.cyan "Html" <> ".text",D.dullyellow "\"Hello!\""]
1607+ "Or use https://package.elm-lang.org/packages/elm/core/latest/Platform#worker to\
1608+ \ make a `main` with no user interface."
1525 MakeCannotBuild buildProblem ->
1611 MakeCannotBuild buildProblem ->
1526 toBuildProblemReport buildProblem
1612 toBuildProblemReport buildProblem