aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTeddy Wing2019-06-16 16:16:05 +0200
committerTeddy Wing2019-06-16 16:16:05 +0200
commit7faa8cb130485a8cd716b1d1869a3cc7235e0482 (patch)
treef57f11a780380e65a8cf49da0d15a275ffe82ace /Makefile
parent5ebc74fb9cf62118345e646d7b04e7a173890a38 (diff)
downloadWindowMode.spoon-7faa8cb130485a8cd716b1d1869a3cc7235e0482.tar.bz2
Add documentation
Used the following Spoons as a format reference: - https://github.com/Hammerspoon/Spoons/blob/master/Source/Tunnelblick.spoon/init.lua - https://github.com/Hammerspoon/Spoons/blob/master/Source/Token.spoon/init.lua The Spoons documentation describes how to generate a required `docs.json` file: https://github.com/Hammerspoon/hammerspoon/blob/master/SPOONS.md Thanks to Adam Matan (https://stackoverflow.com/users/51197/adam-matan) on Stack Overflow for the tip on Make's `CURDIR` variable. Didn't know that existed. https://stackoverflow.com/questions/52437728/bash-what-is-the-difference-between-pwd-and-curdir/52447088#52447088
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c03d62a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,8 @@
+HS ?= /Applications/Hammerspoon.app/Contents/Resources/extensions/hs/ipc/bin/hs
+
+.PHONY: doc
+doc: docs.json
+
+docs.json: *.lua
+ $(HS) -c "hs.doc.builder.genJSON(\"$(CURDIR)\")" \
+ | grep -v "^--" > $@