Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Spago.hs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ parser = do

search =
( "search"
, "Run the search engine."
, "Start a search REPL to find definitions matching names and types"
, pure Search
)

Expand Down
2 changes: 1 addition & 1 deletion src/Spago/Build.hs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ docs format sourcePaths depsOnly = do
echoDebug $ "Running `" <> cmd <> "`"
shell cmd empty >>= \case
ExitSuccess -> pure ()
ExitFailure n -> die $ "Failed while trying to make the documentation searchable: " <> repr n
ExitFailure n -> echo $ "Failed while trying to make the documentation searchable: " <> repr n

where
isHTMLFormat = \case
Expand Down
6 changes: 6 additions & 0 deletions src/Spago/Prelude.hs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ module Spago.Prelude
, withTaskGroup'
, Turtle.mktempdir
, getModificationTime
, docsSearchVersion
) where


Expand Down Expand Up @@ -241,3 +242,8 @@ assertDirectory directory = do
Directory.createDirectory directory

Directory.setPermissions directory private


-- | Release tag for the `purescript-docs-search` app.
docsSearchVersion :: Text
docsSearchVersion = "v0.0.4"
11 changes: 9 additions & 2 deletions src/Spago/Templates.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Data.FileEmbed (embedFile)
import qualified Data.Text as T

import Spago.TH (embedFileUtf8, embedURLWithFallback)
import Spago.Prelude


packagesDhall :: T.Text
Expand All @@ -29,11 +30,17 @@ bowerJson = $(embedFile "templates/bower.json")
docsSearchApp :: T.Text
docsSearchApp =
$(embedURLWithFallback
"https://github.com/spacchetti/purescript-docs-search/releases/download/v0.0.4/docs-search-app.js"
( "https://github.com/spacchetti/purescript-docs-search/releases/download/"
<> T.unpack docsSearchVersion
<> "/docs-search-app.js"
)
"templates/docs-search-app.js")

docsSearch :: T.Text
docsSearch =
$(embedURLWithFallback
"https://github.com/spacchetti/purescript-docs-search/releases/download/v0.0.4/purescript-docs-search"
( "https://github.com/spacchetti/purescript-docs-search/releases/download/"
<> T.unpack docsSearchVersion
<> "/purescript-docs-search"
)
"templates/purescript-docs-search")