]> git.wincent.com - docvim.git/commitdiff
Add convenience wrappers
authorGreg Hurrell <greg@hurrell.net>
Fri, 25 Mar 2016 01:46:38 +0000 (18:46 -0700)
committerGreg Hurrell <greg@hurrell.net>
Fri, 25 Mar 2016 01:46:38 +0000 (18:46 -0700)
Because I am too lazy to type out the full commands.

README.md
bin/accept [new file with mode: 0755]
bin/docvim [new file with mode: 0755]
bin/golden [new file with mode: 0755]
bin/haddock [new file with mode: 0755]
bin/lint [new file with mode: 0755]
bin/tasty [new file with mode: 0755]
bin/test [new file with mode: 0755]

index ac9f0b939aec7f134801d5c95a6c1963d2366f10..4073b8e1cbe9d1299ed8caf96ae3dba3730f39f7 100644 (file)
--- a/README.md
+++ b/README.md
@@ -20,6 +20,20 @@ docvim is a documentation generator for Vim plug-ins, written in Haskell.
 
 ## Development
 
+### Convenience wrappers
+
+```bash
+bin/accept  # Accept current "golden" test output.
+bin/docvim  # Run the docvim executable.
+bin/golden  # Run just the "golden" tests.
+bin/haddock # Produce Haddock documentation.
+bin/lint    # Run the linter.
+bin/tasty   # Run just the Tasty tests.
+bin/test    # Run all tests, including lints.
+```
+
+These are wrappers for the explicit invocations described below.
+
 ### Set-up
 
 You can set-up a development environment using [Stack] (recommended) or [Cabal]:
diff --git a/bin/accept b/bin/accept
new file mode 100755 (executable)
index 0000000..bc4567a
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+stack test :tasty --test-arguments=--accept
diff --git a/bin/docvim b/bin/docvim
new file mode 100755 (executable)
index 0000000..3c61584
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+stack exec docvim -- "$@"
diff --git a/bin/golden b/bin/golden
new file mode 100755 (executable)
index 0000000..0819716
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Cheating here: for now we just run all the tests, not just the golden ones.
+stack test :tasty
diff --git a/bin/haddock b/bin/haddock
new file mode 100755 (executable)
index 0000000..59305e8
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# BUG: grep will exit with non-zero exit code if haddock target is already
+# up-to-date (no output)
+# TODO: capture output and echo it only on error
+stack haddock | grep docvim/index.html
diff --git a/bin/lint b/bin/lint
new file mode 100755 (executable)
index 0000000..9dfda00
--- /dev/null
+++ b/bin/lint
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+stack test :hlint
diff --git a/bin/tasty b/bin/tasty
new file mode 100755 (executable)
index 0000000..d200fe5
--- /dev/null
+++ b/bin/tasty
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+stack test :tasty
diff --git a/bin/test b/bin/test
new file mode 100755 (executable)
index 0000000..b9385f9
--- /dev/null
+++ b/bin/test
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+stack test