[Pkg-mozext-commits] [itsalltext] 18/459: Added docs and better linting

David Prévot taffit at moszumanska.debian.org
Tue Feb 24 23:26:02 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository itsalltext.

commit 9f8cb9c55ace10a7e68dd0af662f99b98d9e2d00
Author: docwhat at gerf.org <docwhat at gerf.org>
Date:   Fri Dec 15 09:23:10 2006 -0500

    Added docs and better linting
---
 .hgignore |  3 +++
 Makefile  | 37 +++++++++++++++++++++++++++++--------
 2 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/.hgignore b/.hgignore
new file mode 100644
index 0000000..ef0447f
--- /dev/null
+++ b/.hgignore
@@ -0,0 +1,3 @@
+syntax:regexp
+^docs/
+\.log$
diff --git a/Makefile b/Makefile
index f300a28..a7d95df 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,10 @@
 # NOTE: do not create files or directories in here that have
 #       spaces or other special characters in their names!
 SOURCES=$(shell find . \
-	   -not -regex '^\(\|.*/\)\(tmpdir\|CVS\|\.hg\|\.DS_Store\).*\(\|/.*\)$$' \
+	   -not -regex '^\(\|.*/\)\(tmpdir\|CVS\|\.hg\|\.DS_Store\|docs\).*\(\|/.*\)$$' \
        -not -name 'Makefile' \
-       -not -name '*-report.txt' \
-       -not -name '*.xpi' \
+       -not -name '*\.log' \
+       -not -name '*\.xpi' \
        -not -name '.*' \
        -not -name '*~' \
 	   -print)
@@ -19,17 +19,38 @@ else
 	Q = @
 endif
 
-all: $(XPI_FILE) $(MOZILLA_XPI_FILE)
+all: jslint docs xpi
 	$(Q)echo done
 
+.PHONY: xpi
+xpi: jslint $(XPI_FILE)
+
 %.xpi: $(SOURCES)
 	$(Q)echo Creating $@ ...
 	$(Q)echo "$^" | perl -p -e 's/ /\n/g;' \
     | zip $@ -@
 
-jslint-report.txt: $(SOURCES_JS)
-	$(Q)for jsfile in $^; do jslint $${jsfile}; done > "$@" 2>&1
+docs: $(SOURCES_JS)
+	$(Q)echo Creating $@ ...
+	$(Q)jsdoc --directory "$@" \
+	--project-name "It's All Text" \
+	--logo chrome/content/icon.png \
+	--package-naming \
+	--private \
+	$(SOURCES_JS)
+
+.PHONY: jslint
+jslint: jslint.log
+
+jslint.log: $(SOURCES_JS)
+	$(Q)echo Linting source ...
+	$(Q)for jsfile in $^; do echo "jslint: $${jsfile}" ; jslint $${jsfile}; done > "$@" 2>&1
+	$(Q)if [ `egrep -v '^jslint: ' "$@" | wc -l` -eq 0 ]; \
+	 then echo "  ... pass" ; \
+	 else touch --date='1972-01-01' "$@"; \
+	   echo "  ... there were $$(egrep '^Lint at line ' $@ | wc -l) errors."; \
+	 fi
 
-.PHONY: realclean
+.PHONY: clean
 clean:
-	$(Q)rm -f $(XPI_FILE)
+	$(Q)rm -rf $(XPI_FILE) *.log docs

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/itsalltext.git



More information about the Pkg-mozext-commits mailing list