Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using jsDoc to create documentations for my JavaScript files. The command I use is

> java -jar jsrun.jar app\run.js -a -t=templates\jsdoc mycode.js

What I want is to create a batch or something else (I really don't know), so that I can type

> jsdoc mycode.js

Without having to specify any folders or change my working directory in the command line.

Is this possible? How?

Thanks!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Make a batch file called "jsdoc.bat" and ensure that you have a path you your jsdoc folder / app folder (or code the full locations in). Ensure there is a path to wherever you put this file

set path = c:\whereverthebatfileis\
The following would be the code.

java -jar jsrun.jar  c:\whateverfolder\app\run.js -a -t=c:\whateverfolder\templates\jsdoc\ %1

Usage would be:

jsdoc myfile.js

share|improve this answer
    
can you specify where shall I put "set path = c:\doc_js"?? –  Omar Abid Mar 20 '11 at 2:21
    
Either type it in the command line, or set a path in your enviornment variables (right click your computer and go to properties, click advanced system settings, it will be at the bottom). Find "PATH" in your system variables and add the location to the list. It should be permanant either way. –  iivel Mar 20 '11 at 2:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.