mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Rhino likes the filepaths (all args really) to be url encoded, which is an issue if spaces appear in filepaths. This makes JSDoc cooperate better with that rule.
This commit is contained in:
parent
4ac7f4b488
commit
51e1a785f8
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
|
||||
|
||||
@ -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));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user