Skip to content

Commit

Permalink
v0.0.4
Browse files Browse the repository at this point in the history
* v0.0.4

* added: `version` command

* refactor .travis.yml; use sh syntax

* remove `main` field from package.json

* add CHANGELOG.md
  • Loading branch information
klntsky authored Jul 25, 2019
1 parent 06f26b3 commit 90c10e0
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ install:
- spago install

script:
- spago build
- spago test
- spago docs
- npm run build
- npm test
# Check if it the app is able to build the search index for itself.
- spago docs
- ./dist/purescript-docs-search build-index

deploy:
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.4] - 2019-07-25

New features:
- Reduce the package size by using a minifier.
- Add `version` command to print the app version.
- **S** hotkey now `.select()`s everything in the search field, insetead of just `.focus()`ing (#11).

## [0.0.3] - 2019-07-23

Bugfixes:
- Fix stack safety issue (#8).

## [0.0.2] - 2019-07-21

## [0.0.1] - 2019-07-20
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "purescript-docs-search",
"version": "0.0.3",
"version": "0.0.4",
"description": "Search frontend for the documentation generated by the PureScript compiler.",
"main": "dist/main.js",
"directories": {
"test": "test"
},
"bin": {
"purescript-docs-search": "dist/purescript-docs-search"
},
"files": [
"dist/main.js",
"dist/purescript-docs-search",
"dist/docs-search-app.js",
"README.md"
"README.md",
"CHANGELOG.md"
],
"scripts": {
"test": "spago test",
Expand All @@ -25,7 +25,9 @@
"chmod-main": "chmod +x dist/purescript-docs-search",
"build-main": "npm run bundle-main && npm run parcel-main && npm run add-shebang && rm dist/main.js && npm run chmod-main",
"build": "npm run build-app && npm run build-main",
"clean": "rm -rf dist"
"clean": "rm -rf dist",
"check-version": "[ \"$(./dist/purescript-docs-search version)\" = \"$npm_package_version\" ]",
"test": "spago test && npm run check-version"
},
"repository": {
"type": "git",
Expand Down
8 changes: 8 additions & 0 deletions src/Docs/Search/Main.purs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Data.List.NonEmpty as NonEmpty
import Data.Maybe (Maybe, fromMaybe, optional)
import Data.Unfoldable (class Unfoldable)
import Effect (Effect)
import Effect.Console (log)
import Options.Applicative (Parser, command, execParser, fullDesc, helper, info, long, metavar, progDesc, strOption, subparser, value, (<**>))
import Options.Applicative as CA

Expand All @@ -24,6 +25,7 @@ main = do
case fromMaybe defaultCommands args of
BuildIndex cfg -> IndexBuilder.run cfg
Search cfg -> Interactive.run cfg
Version -> log "0.0.4"

getArgs :: Effect (Maybe Commands)
getArgs = execParser opts
Expand All @@ -39,6 +41,7 @@ data Commands
, generatedDocs :: String
}
| Search { docsFiles :: Array String }
| Version

derive instance genericCommands :: Generic Commands _

Expand All @@ -57,6 +60,11 @@ commands = optional $ subparser
( progDesc "Run the search engine."
)
)
<> command "version"
( info (pure Version)
( progDesc "Show purescript-docs-search version."
)
)
)

buildIndex :: Parser Commands
Expand Down

0 comments on commit 90c10e0

Please sign in to comment.