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'`
|
URLPATH=`echo "$URLPATH" | sed -e 's/ /%20/g'`
|
||||||
ENCODEDBASEPATH=`echo "$BASEPATH" | sed -e 's/ /%20/g'`
|
ENCODEDBASEPATH=`echo "$BASEPATH" | sed -e 's/ /%20/g'`
|
||||||
|
|
||||||
if test $1 = "--debug"
|
ARGS="$@"
|
||||||
|
|
||||||
|
if test "$1" = "--debug"
|
||||||
then
|
then
|
||||||
echo "Running Debug"
|
echo "Running Debug"
|
||||||
CMD="org.mozilla.javascript.tools.debugger.Main -debug"
|
CMD="org.mozilla.javascript.tools.debugger.Main -debug"
|
||||||
@ -20,12 +22,12 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#Conditionally execute different command lines depending on whether we're running tests or not
|
#Conditionally execute different command lines depending on whether we're running tests or not
|
||||||
if test $1 = "-T"
|
if test "$1" = "-T"
|
||||||
then
|
then
|
||||||
echo "Running Tests"
|
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
|
else
|
||||||
# normal mode should be quiet
|
# 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
|
fi
|
||||||
|
|||||||
@ -27,7 +27,7 @@ var doop = require("jsdoc/util/doop").doop;
|
|||||||
doclets = index[name];
|
doclets = index[name];
|
||||||
for (var i=0, ii=doclets.length; i<ii; ++i) {
|
for (var i=0, ii=doclets.length; i<ii; ++i) {
|
||||||
doc = doclets[i];
|
doc = doclets[i];
|
||||||
if (doc.kind === "class") {
|
if (doc.kind === "class" || doc.kind === "external") {
|
||||||
dependencies[name] = {};
|
dependencies[name] = {};
|
||||||
len = doc.augments && doc.augments.length || 0;
|
len = doc.augments && doc.augments.length || 0;
|
||||||
for (var j=0; j<len; ++j) {
|
for (var j=0; j<len; ++j) {
|
||||||
@ -94,6 +94,7 @@ var doop = require("jsdoc/util/doop").doop;
|
|||||||
visit: function(key) {
|
visit: function(key) {
|
||||||
if (!(key in this.visited)) {
|
if (!(key in this.visited)) {
|
||||||
this.visited[key] = true;
|
this.visited[key] = true;
|
||||||
|
|
||||||
if (!(key in this.dependencies)) {
|
if (!(key in this.dependencies)) {
|
||||||
throw new Error("Missing dependency: " + key);
|
throw new Error("Missing dependency: " + key);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,11 +36,12 @@ exports.Scanner.prototype.scan = function(searchPaths, depth, filter) {
|
|||||||
depth = depth || 1;
|
depth = depth || 1;
|
||||||
|
|
||||||
searchPaths.forEach(function($) {
|
searchPaths.forEach(function($) {
|
||||||
if ( fs.stat($).isFile() ) {
|
var filepath = decodeURIComponent($);
|
||||||
filePaths.push($);
|
if ( fs.stat(filepath).isFile() ) {
|
||||||
|
filePaths.push(filepath);
|
||||||
}
|
}
|
||||||
else {
|
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) {
|
if (tag.value && tag.value.type) {
|
||||||
doclet.type = tag.value.type;
|
doclet.type = tag.value.type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
.synonym('host');
|
||||||
|
|
||||||
dictionary.defineTag('exports', {
|
dictionary.defineTag('exports', {
|
||||||
mustHaveValue: true,
|
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
|
// check all .js files unless they're tests; rhino shim files that probably can't be
|
||||||
// delinted; or third-party modules
|
// delinted; or third-party modules
|
||||||
source = {
|
source = {
|
||||||
includePattern: ".+\\.js$",
|
includePattern: '.+[\\|/]rhino_modules[\\|/].+\.js$|.+[\\|/]plugins[\\|/]\w+\.js$',
|
||||||
excludePattern: ".+[\\\\|/]test[\\\\|/].+|.+rhino-shim\\.js|.+[\\\\|/]Jake[\\\\|/].+|.+[\\\\|/]node_modules[\\\\|/].+"
|
excludePattern: '.+[\\|/]test[\\|/].+'
|
||||||
};
|
};
|
||||||
filter = new (require('jsdoc/src/filter').Filter)(source);
|
filter = new (require('jsdoc/src/filter').Filter)(source);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user