Merge branch 'master' into jshint-clean-v2

This commit is contained in:
Jeff Williams 2012-07-08 21:21:08 -07:00
commit 51937112f4
6 changed files with 28 additions and 12 deletions

10
jsdoc
View File

@ -10,7 +10,9 @@ URLPATH="file://"$BASEPATH
URLPATH=`echo "$URLPATH" | sed -e 's/ /%20/g'`
ENCODEDBASEPATH=`echo "$BASEPATH" | sed -e 's/ /%20/g'`
if test $1 = "--debug"
ARGS="$@"
if test "$1" = "--debug"
then
echo "Running Debug"
CMD="org.mozilla.javascript.tools.debugger.Main -debug"
@ -20,12 +22,12 @@ else
fi
#Conditionally execute different command lines depending on whether we're running tests or not
if test $1 = "-T"
if test "$1" = "-T"
then
echo "Running Tests"
java -classpath "${BASEPATH}/lib/js.jar" ${CMD} -opt -1 -modules "${URLPATH}/node_modules" -modules "${URLPATH}/rhino_modules" -modules "${URLPATH}" "${BASEPATH}/jsdoc.js" $@ --dirname="${BASEPATH}/"
java -classpath "${BASEPATH}/lib/js.jar" ${CMD} -opt -1 -modules "${URLPATH}/node_modules" -modules "${URLPATH}/rhino_modules" -modules "${URLPATH}" "${BASEPATH}/jsdoc.js" $ARGS --dirname="${BASEPATH}/"
else
# normal mode should be quiet
java -classpath "${BASEPATH}/lib/js.jar" ${CMD} -modules "${URLPATH}/node_modules" -modules "${URLPATH}/rhino_modules" -modules "${URLPATH}" "${BASEPATH}/jsdoc.js" $@ --dirname="${BASEPATH}/"
java -classpath "${BASEPATH}/lib/js.jar" ${CMD} -modules "${URLPATH}/node_modules" -modules "${URLPATH}/rhino_modules" -modules "${URLPATH}" "${BASEPATH}/jsdoc.js" $ARGS --dirname="${BASEPATH}/"
fi

View File

@ -27,7 +27,7 @@ var doop = require("jsdoc/util/doop").doop;
doclets = index[name];
for (var i=0, ii=doclets.length; i<ii; ++i) {
doc = doclets[i];
if (doc.kind === "class") {
if (doc.kind === "class" || doc.kind === "external") {
dependencies[name] = {};
len = doc.augments && doc.augments.length || 0;
for (var j=0; j<len; ++j) {
@ -94,6 +94,7 @@ var doop = require("jsdoc/util/doop").doop;
visit: function(key) {
if (!(key in this.visited)) {
this.visited[key] = true;
if (!(key in this.dependencies)) {
throw new Error("Missing dependency: " + key);
}

View File

@ -36,11 +36,12 @@ exports.Scanner.prototype.scan = function(searchPaths, depth, filter) {
depth = depth || 1;
searchPaths.forEach(function($) {
if ( fs.stat($).isFile() ) {
filePaths.push($);
var filepath = decodeURIComponent($);
if ( fs.stat(filepath).isFile() ) {
filePaths.push(filepath);
}
else {
filePaths = filePaths.concat(fs.ls($, depth));
filePaths = filePaths.concat(fs.ls(filepath, depth));
}
});

View File

@ -312,7 +312,8 @@ exports.defineTags = function(dictionary) {
doclet.type = tag.value.type;
}
}
});
})
.synonym('host');
dictionary.defineTag('exports', {
mustHaveValue: true,

11
test/fixtures/externals2.js vendored Normal file
View File

@ -0,0 +1,11 @@
/**
Namespace provided by the browser.
@external XMLHttpRequest
@see https://developer.mozilla.org/en/xmlhttprequest
*/
/**
Extends the built in XMLHttpRequest to send data encoded with a secret key.
@class EncryptedRequest
@extends external:XMLHttpRequest
*/

View File

@ -41,8 +41,8 @@ describe("jshint-clean", function() {
// check all .js files unless they're tests; rhino shim files that probably can't be
// delinted; or third-party modules
source = {
includePattern: ".+\\.js$",
excludePattern: ".+[\\\\|/]test[\\\\|/].+|.+rhino-shim\\.js|.+[\\\\|/]Jake[\\\\|/].+|.+[\\\\|/]node_modules[\\\\|/].+"
includePattern: '.+[\\|/]rhino_modules[\\|/].+\.js$|.+[\\|/]plugins[\\|/]\w+\.js$',
excludePattern: '.+[\\|/]test[\\|/].+'
};
filter = new (require('jsdoc/src/filter').Filter)(source);