From 7faa8cb130485a8cd716b1d1869a3cc7235e0482 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 16 Jun 2019 16:16:05 +0200 Subject: 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 --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 "^--" > $@ -- cgit v1.2.3