git.iko.soy/rowtype-yoga/purescript-docs-search
on master help sign in
v0.0.4

* v0.0.4 * added: `version` command * refactor .travis.yml; use sh syntax * remove `main` field from package.json * add CHANGELOG.md

commit90c10e017de26c66703ed654845a53c9c35fa995 authorVladimir Kalnitsky <klntsky@gmail.com> dateThu 25 Jul 2019, 14:18 (7 years ago) parent06f26b3
4 files changed+40−8
.travis.yml+3−3 CHANGELOG.md+22 package.json+7−5 src/Docs/Search/Main.purs+8
.travis.yml+3−3
@@ -23,10 +23,10 @@ install:
2323- spago install
2424
2525script:
26−- spago build
27−- spago test
28−- spago docs
2926- npm run build
27+- npm test
28+# Check if it the app is able to build the search index for itself.
29+- spago docs
3030- ./dist/purescript-docs-search build-index
3131
3232deploy:
CHANGELOG.mdnew file+22
@@ -0,0 +1,22 @@
1+# Changelog
2+
3+All notable changes to this project will be documented in this file.
4+
5+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+## [0.0.4] - 2019-07-25
9+
10+New features:
11+- Reduce the package size by using a minifier.
12+- Add `version` command to print the app version.
13+- **S** hotkey now `.select()`s everything in the search field, insetead of just `.focus()`ing (#11).
14+
15+## [0.0.3] - 2019-07-23
16+
17+Bugfixes:
18+- Fix stack safety issue (#8).
19+
20+## [0.0.2] - 2019-07-21
21+
22+## [0.0.1] - 2019-07-20
package.json+7−5
@@ -1,8 +1,7 @@
11{
22 "name": "purescript-docs-search",
3− "version": "0.0.3",
3+ "version": "0.0.4",
44 "description": "Search frontend for the documentation generated by the PureScript compiler.",
5− "main": "dist/main.js",
65 "directories": {
76 "test": "test"
87 },
@@ -10,9 +9,10 @@
109 "purescript-docs-search": "dist/purescript-docs-search"
1110 },
1211 "files": [
13− "dist/main.js",
12+ "dist/purescript-docs-search",
1413 "dist/docs-search-app.js",
15− "README.md"
14+ "README.md",
15+ "CHANGELOG.md"
1616 ],
1717 "scripts": {
1818 "test": "spago test",
@@ -25,7 +25,9 @@
2525 "chmod-main": "chmod +x dist/purescript-docs-search",
2626 "build-main": "npm run bundle-main && npm run parcel-main && npm run add-shebang && rm dist/main.js && npm run chmod-main",
2727 "build": "npm run build-app && npm run build-main",
28− "clean": "rm -rf dist"
28+ "clean": "rm -rf dist",
29+ "check-version": "[ \"$(./dist/purescript-docs-search version)\" = \"$npm_package_version\" ]",
30+ "test": "spago test && npm run check-version"
2931 },
3032 "repository": {
3133 "type": "git",
src/Docs/Search/Main.purs+8
@@ -12,6 +12,7 @@ import Data.List.NonEmpty as NonEmpty
1212import Data.Maybe (Maybe, fromMaybe, optional)
1313import Data.Unfoldable (class Unfoldable)
1414import Effect (Effect)
15+import Effect.Console (log)
1516import Options.Applicative (Parser, command, execParser, fullDesc, helper, info, long, metavar, progDesc, strOption, subparser, value, (<**>))
1617import Options.Applicative as CA
1718
@@ -24,6 +25,7 @@ main = do
2425 case fromMaybe defaultCommands args of
2526 BuildIndex cfg -> IndexBuilder.run cfg
2627 Search cfg -> Interactive.run cfg
28+ Version -> log "0.0.4"
2729
2830getArgs :: Effect (Maybe Commands)
2931getArgs = execParser opts
@@ -39,6 +41,7 @@ data Commands
3941 , generatedDocs :: String
4042 }
4143 | Search { docsFiles :: Array String }
44+ | Version
4245
4346derive instance genericCommands :: Generic Commands _
4447
@@ -57,6 +60,11 @@ commands = optional $ subparser
5760 ( progDesc "Run the search engine."
5861 )
5962 )
63+ <> command "version"
64+ ( info (pure Version)
65+ ( progDesc "Show purescript-docs-search version."
66+ )
67+ )
6068 )
6169
6270buildIndex :: Parser Commands