Search frontend for the documentation generated by the PureScript compiler
Go to file
2023-07-25 13:48:27 +01:00
.github/workflows Add help texts for all options, bump version 2022-08-31 23:32:32 +04:00
src/Docs/Search Update port 2023-07-25 13:48:27 +01:00
test Extract module names from sources 2022-08-31 23:32:32 +04:00
.gitignore use parcel (#13) 2019-07-25 12:49:54 +03:00
CHANGELOG.md Update CHANGELOG 2022-09-01 00:17:50 +04:00
ci-npmrc.txt Fix NPM publish in CI (#50) 2021-04-20 15:10:29 +02:00
package-lock.json First working version of pursuit http service 2023-01-23 22:18:43 +01:00
package.json First working version of pursuit http service 2023-01-23 22:18:43 +01:00
packages.dhall First working version of pursuit http service 2023-01-23 22:18:43 +01:00
preview.png added: CLI interface; added: search REPL (#5) 2019-07-21 17:29:43 +03:00
README.md Update badge (#64) 2022-09-01 22:15:04 +03:00
release.sh Add release script (#49) 2021-04-19 12:44:58 +02:00
spago.dhall First working version of pursuit http service 2023-01-23 22:18:43 +01:00

purescript-docs-search

Build status

An app that adds search capabilities to generated documentation for PureScript code.

It supports nearly-all functionality of Pursuit, including querying by type.

Installing

When using spago, you don't need to install this app manually: run spago docs or spago search.

Otherwise, use NPM (npm install purescript-docs-search) or npx: npx purescript-docs-search.

Usage

There are two usage scenarios:

Patching static documentation

Use purescript-docs-search build-index command to patch HTML files located in generated-docs/html. You then will be able to search for declarations or types:

Preview

The user interface of the app is optimised for keyboard-only use.

S hotkey can be used to focus on the search field, Escape can be used to leave it. Pressing Escape twice will close the search results listing.

Using the CLI

Running purescript-docs-search within a project directory will open an interactive command-line session.

Note that unlike in Pursuit, most relevant results will appear last.

A quick demo:

asciicast

You may notice that the CLI offers slightly better results than the web interface. This is a performance tradeoff.

Development

npm install
npm run build # or build-dev to skip JS compression stage

Use spago docs --no-search && ./dist/purescript-docs-search.cjs build-index to generate the docs and patch them using the local version of the app.