mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
added short-form command for Windows
This commit is contained in:
parent
2f8c9cc3be
commit
f962577793
19
README.md
19
README.md
@ -17,17 +17,20 @@ Download a copy of JSDoc 3 from the official Git Hub repository here:
|
||||
<https://github.com/jsdoc3/jsdoc>
|
||||
|
||||
To test that jsdoc is working, change your working directory to the jsdoc folder
|
||||
and run the following command:
|
||||
and run the following command on Windows:
|
||||
|
||||
java -cp lib/js.jar org.mozilla.javascript.tools.shell.Main \
|
||||
-modules node_modules -modules rhino_modules -modules . \
|
||||
jsdoc.js -T
|
||||
|
||||
If you are operating on a Mac OSX or *nix platform, you can shorten that command
|
||||
to this:
|
||||
jsdoc -T
|
||||
|
||||
... or on a Max OSX or *nix platform:
|
||||
|
||||
./jsdoc -T
|
||||
|
||||
If you can't get the short-form commands to work, try invoking Java directly:
|
||||
|
||||
java -cp lib/js.jar org.mozilla.javascript.tools.shell.Main \
|
||||
-modules node_modules -modules rhino_modules -modules . \
|
||||
jsdoc.js -T
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
@ -38,7 +41,7 @@ directory:
|
||||
|
||||
For help regarding the supported commandline options use the --help option.
|
||||
|
||||
./jsdoc --help
|
||||
./jsdoc --help
|
||||
|
||||
Generated documentation will appear in the folder specified by the --destination
|
||||
option, or in a folder named "out" by default.
|
||||
|
||||
23
jsdoc.cmd
Normal file
23
jsdoc.cmd
Normal file
@ -0,0 +1,23 @@
|
||||
@ECHO OFF
|
||||
|
||||
SETLOCAL
|
||||
|
||||
REM jsdoc.js expects Unix-style paths without a trailing slash
|
||||
SET _BASEPATH=%~dp0
|
||||
SET _BASEPATH=%_BASEPATH:\=/%
|
||||
SET _BASEPATH=%_BASEPATH:~0,-1%
|
||||
|
||||
REM for whatever reason, Rhino requires module paths to be valid URIs
|
||||
SET _URLPATH=file:/%_BASEPATH%
|
||||
|
||||
:ESCAPE_SPACE
|
||||
SET _TRAILING=%_URLPATH:* =%
|
||||
CALL SET _URLPATH=%%_URLPATH: %_TRAILING%=%%
|
||||
SET _URLPATH=%_URLPATH%%%20%_TRAILING%
|
||||
IF NOT "%_URLPATH%"=="%_URLPATH: =%" GOTO ESCAPE_SPACE
|
||||
|
||||
java -classpath "%_BASEPATH%/lib/js.jar" org.mozilla.javascript.tools.shell.Main -modules "%_URLPATH%/node_modules" -modules "%_URLPATH%/rhino_modules" -modules "%_URLPATH%" "%_BASEPATH%/jsdoc.js" %* --dirname="%_BASEPATH%/
|
||||
|
||||
REM java -classpath "%_BASEPATH%/lib/js.jar" org.mozilla.javascript.tools.debugger.Main -debug -modules "%_URLPATH%/node_modules/" -modules "%_URLPATH%/rhino_modules/" -modules "%_URLPATH%/" "%_BASEPATH%/jsdoc.js" %* --dirname="%_BASEPATH%/
|
||||
|
||||
ENDLOCAL
|
||||
Loading…
x
Reference in New Issue
Block a user