Skip to content

Commit 90c10e0

Browse files
authored
v0.0.4
* v0.0.4 * added: `version` command * refactor .travis.yml; use sh syntax * remove `main` field from package.json * add CHANGELOG.md
1 parent 06f26b3 commit 90c10e0

File tree

4 files changed

+40
-8
lines changed

4 files changed

+40
-8
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ install:
2323
- spago install
2424

2525
script:
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

3232
deploy:

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
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
},
98
"bin": {
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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import Data.List.NonEmpty as NonEmpty
1212
import Data.Maybe (Maybe, fromMaybe, optional)
1313
import Data.Unfoldable (class Unfoldable)
1414
import Effect (Effect)
15+
import Effect.Console (log)
1516
import Options.Applicative (Parser, command, execParser, fullDesc, helper, info, long, metavar, progDesc, strOption, subparser, value, (<**>))
1617
import 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

2830
getArgs :: Effect (Maybe Commands)
2931
getArgs = execParser opts
@@ -39,6 +41,7 @@ data Commands
3941
, generatedDocs :: String
4042
}
4143
| Search { docsFiles :: Array String }
44+
| Version
4245

4346
derive 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

6270
buildIndex :: Parser Commands

0 commit comments

Comments
 (0)