mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Merge branch 'master' into jshint-clean-v2
This commit is contained in:
commit
51937112f4
10
jsdoc
10
jsdoc
@ -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
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -311,8 +311,9 @@ exports.defineTags = function(dictionary) {
|
||||
if (tag.value && tag.value.type) {
|
||||
doclet.type = tag.value.type;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
.synonym('host');
|
||||
|
||||
dictionary.defineTag('exports', {
|
||||
mustHaveValue: true,
|
||||
|
||||
11
test/fixtures/externals2.js
vendored
Normal file
11
test/fixtures/externals2.js
vendored
Normal 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
|
||||
*/
|
||||
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user