From 42e65927e58885bbbd0b12ad5c3884bd2f4c8790 Mon Sep 17 00:00:00 2001 From: klntsky Date: Thu, 25 Jul 2019 12:53:19 +0300 Subject: [PATCH 1/6] v0.0.4 --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 89f1c9b..75392ad 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "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", + "main": "dist/purescript-docs-search", "directories": { "test": "test" }, @@ -10,7 +10,7 @@ "purescript-docs-search": "dist/purescript-docs-search" }, "files": [ - "dist/main.js", + "dist/purescript-docs-search", "dist/docs-search-app.js", "README.md" ], From 80e9c2adbac9264350d65399b3b739873ad5e1db Mon Sep 17 00:00:00 2001 From: klntsky Date: Thu, 25 Jul 2019 13:27:12 +0300 Subject: [PATCH 2/6] added: `version` command --- .travis.yml | 1 + package.json | 4 +++- src/Docs/Search/Main.purs | 8 ++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index eaff4d5..ff40af2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,7 @@ script: - spago test - spago docs - npm run build +- npm test - ./dist/purescript-docs-search build-index deploy: diff --git a/package.json b/package.json index 75392ad..d1e93d3 100644 --- a/package.json +++ b/package.json @@ -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": "npm run check-version" }, "repository": { "type": "git", diff --git a/src/Docs/Search/Main.purs b/src/Docs/Search/Main.purs index abe61be..6204589 100644 --- a/src/Docs/Search/Main.purs +++ b/src/Docs/Search/Main.purs @@ -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 @@ -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 @@ -39,6 +41,7 @@ data Commands , generatedDocs :: String } | Search { docsFiles :: Array String } + | Version derive instance genericCommands :: Generic Commands _ @@ -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 From af0bcb269f80765720a0dc8ff2fc4e906f7ad2a8 Mon Sep 17 00:00:00 2001 From: klntsky Date: Thu, 25 Jul 2019 13:38:07 +0300 Subject: [PATCH 3/6] use bash syntax --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d1e93d3..4866bbe 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "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", - "check-version": "[[ `./dist/purescript-docs-search version` == $npm_package_version ]]", + "check-version": "[ \"$(./dist/purescript-docs-search version)\" == \"$npm_package_version\" ]", "test": "npm run check-version" }, "repository": { From e45aca7069d04897bdab29bab9073a9065d69ebd Mon Sep 17 00:00:00 2001 From: klntsky Date: Thu, 25 Jul 2019 13:48:03 +0300 Subject: [PATCH 4/6] refactor .travis.yml; use sh syntax --- .travis.yml | 5 ++--- package.json | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index ff40af2..4febb76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,11 +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: diff --git a/package.json b/package.json index 4866bbe..eff21c4 100644 --- a/package.json +++ b/package.json @@ -26,8 +26,8 @@ "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", - "check-version": "[ \"$(./dist/purescript-docs-search version)\" == \"$npm_package_version\" ]", - "test": "npm run check-version" + "check-version": "[ \"$(./dist/purescript-docs-search version)\" = \"$npm_package_version\" ]", + "test": "spago test && npm run check-version" }, "repository": { "type": "git", From 32bc149adcdc506bf0885f404b9ec51e7586bf93 Mon Sep 17 00:00:00 2001 From: klntsky Date: Thu, 25 Jul 2019 13:52:02 +0300 Subject: [PATCH 5/6] remove `main` field from package.json --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index eff21c4..ea9c54b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,6 @@ "name": "purescript-docs-search", "version": "0.0.4", "description": "Search frontend for the documentation generated by the PureScript compiler.", - "main": "dist/purescript-docs-search", "directories": { "test": "test" }, From 5187877da3112b7a540b4e2c3d6329afb435a8ae Mon Sep 17 00:00:00 2001 From: klntsky Date: Thu, 25 Jul 2019 14:10:55 +0300 Subject: [PATCH 6/6] add CHANGELOG.md --- CHANGELOG.md | 22 ++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..9af155e --- /dev/null +++ b/CHANGELOG.md @@ -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 diff --git a/package.json b/package.json index ea9c54b..ebf2061 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "files": [ "dist/purescript-docs-search", "dist/docs-search-app.js", - "README.md" + "README.md", + "CHANGELOG.md" ], "scripts": { "test": "spago test",