@@ -1,19 +1,19 @@
11-- | The main module of the CLI interface app.
22module Docs.Search.Main where
33
4−import Prelude
5−
4+import Docs.Search.Config as Config
65import Docs.Search.IndexBuilder as IndexBuilder
76import Docs.Search.Interactive as Interactive
8−import Docs.Search.Config as Config
97import Docs.Search.Types (PackageName(..))
108
9+import Prelude
10+
1111import Data.Generic.Rep (class Generic)
12−import Data.Show.Generic (genericShow)
1312import Data.List as List
1413import Data.List.NonEmpty as NonEmpty
1514import Data.Maybe (Maybe, fromMaybe, optional)
1615import Data.Newtype (unwrap)
16+import Data.Show.Generic (genericShow)
1717import Data.Unfoldable (class Unfoldable)
1818import Effect (Effect)
1919import Effect.Console (log)
@@ -85,6 +85,7 @@ buildIndex = ado
8585 ( long "generated-docs"
8686 <> metavar "DIR"
8787 <> value "./generated-docs/"
88+ <> help "Path to the generated documentation HTML that will be patched. Search app will be injected into each HTML document."
8889 )
8990 noPatch <- flag false true
9091 ( long "no-patch"
@@ -108,6 +109,7 @@ docsFilesOption = fromMaybe defaultDocsFiles <$>
108109 ( strOption
109110 ( long "docs-files"
110111 <> metavar "GLOB"
112+ <> help "Glob that captures `docs.json` files that should be used to build the index"
111113 )
112114 )
113115 )
@@ -119,6 +121,7 @@ bowerFilesOption = fromMaybe defaultBowerFiles <$>
119121 ( strOption
120122 ( long "bower-jsons"
121123 <> metavar "GLOB"
124+ <> help "Glob that captures `bower.json` files. These files are used to build dependency trees to compute package popularity scores based on how many dependants a package has."
122125 )
123126 )
124127 )
@@ -129,6 +132,7 @@ packageNameOption =
129132 ( long "package-name"
130133 <> metavar "PACKAGE"
131134 <> value (unwrap Config.defaultPackageName)
135+ <> help "Local package name as it should appear in the search results"
132136 )
133137
134138sourceFilesOption :: Parser (Array String)
@@ -138,6 +142,7 @@ sourceFilesOption = fromMaybe defaultSourceFiles <$>
138142 ( strOption
139143 ( long "source-files"
140144 <> metavar "GLOB"
145+ <> help "Path to project source files, used for more precise module indexing (see #62). Default: src/**/*.purs"
141146 )
142147 )
143148 )