Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add Makefile.

  • Loading branch information...
commit fb372f11edb9cca51923d500aeb432e4fe584603 1 parent 830fd7c
Reid Burke reid authored

Showing 1 changed file with 58 additions and 0 deletions. Show diff stats Hide diff stats

  1. +58 0 Makefile
58 Makefile
... ... @@ -0,0 +1,58 @@
  1 +help:
  2 + @echo "Type \`make all\` first to get started."
  3 + @echo "\`make test\` for unit tests."
  4 + @echo "\`make lint\` to run JSLint."
  5 + @echo "\`make html\` to build HTML documentation."
  6 +
  7 +all: install
  8 +
  9 +install: sanity
  10 + npm i
  11 +
  12 +sanity:
  13 + sh script/sanity.sh
  14 +
  15 +test:
  16 + sh script/test.sh test/*.js
  17 +
  18 +spec:
  19 + sh script/test.sh --spec test/*.js
  20 +
  21 +smoke:
  22 + sh script/test.sh test/smoke/*.js
  23 +
  24 +smoke-spec:
  25 + sh script/test.sh --spec test/smoke/*.js
  26 +
  27 +lint:
  28 + # Problem? Try `make install-dev`
  29 + find lib test -name "*.js" -print0 | xargs -0 ./node_modules/.bin/jslint --forin
  30 +
  31 +DOC:=doc
  32 +DOCS:=$(addprefix $(DOC)/, README.html HISTORY.html)
  33 +
  34 +html: $(DOCS)
  35 +
  36 +$(DOC):
  37 + mkdir $@
  38 +
  39 +$(DOCS): | $(DOC)
  40 +
  41 +RONN = ./node_modules/.bin/ronn
  42 +
  43 +$(DOC)/README.html: README.md
  44 + # Problem? Try `make install`
  45 + $(RONN) -5 $< > $@
  46 +
  47 +$(DOC)/HISTORY.html: HISTORY.md
  48 + # Problem? Try `make install`
  49 + $(RONN) -5 $< > $@
  50 +
  51 +preview: $(DOCS)
  52 + sh script/open.sh $?
  53 + touch preview
  54 +
  55 +clean:
  56 + rm -rf $(DOC) node_modules npm-*.log
  57 +
  58 +.PHONY: help sanity install test spec lint smoke smoke-spec html preview clean

0 comments on commit fb372f1

Please sign in to comment.
Something went wrong with that request. Please try again.