Skip to content

Commit

Permalink
Add a Makefile that creates API documentation and runs unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric James Michael Ritz committed Aug 18, 2013
1 parent f773813 commit 927a1c8
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Do not track documentation that LuaDoc creates.
docs/
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.PHONY : docs tests

all: docs tests

# We generate documentation via the LuaDoc tool but the directory
# where we store the documents may not exist. This rule creates the
# documentation directory if it is not present. LuaDoc will also spit
# out a 'luadoc.css' file into the top-level directory which we do not
# want to keep. This rule will delete it.
docs:
if test ! -d "docs/"; then mkdir "docs"; fi
luadoc -d "docs/" "src/Luvent.lua"
if test -f "luadoc.css"; then rm "luadoc.css"; fi

tests:
busted
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ Luvent requires one of the following Lua implementations:
These are the versions we use to test Luvent. It should work with
later versions of each, and possibly older versions as well.

### Optional ###

The following programs are not necessary in order to use Luvent but
you will need them to run the unit tests, generate API documentation,
and so on.

* [LuaDoc][]
* [busted][]


Documentation
-------------

Running the command `make docs` will populate the `docs/` directory
with HTML documents that describe Luvent’s API.


Acknowledgments
---------------
Expand All @@ -47,3 +63,5 @@ Copyright 2013 Eric James Michael Ritz
[EventLib]: https://github.com/mlnlover11/EventLib
[Node.js]: http://nodejs.org/
[LuaJIT]: http://luajit.org/
[LuaDoc]: http://keplerproject.github.io/luadoc/
[busted]: http://olivinelabs.com/busted/

0 comments on commit 927a1c8

Please sign in to comment.