wenchun / jsdoc-toolkit

Automatically exported from code.google.com/p/jsdoc-toolkit
0 stars 0 forks source link

Running jsdoc toolkit prefers to execute editor backups instead of real source files. #190

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Upon editing Walker.js my editor places a Walker.js~ backup beside the file.
2. java -jar jsrun.jar app/run.js   executes the wrong file.
3. This executes Walker.js~ instead of Walker.js !!!

This is the strangest thing I have seen sofar. Quite hard to identify. I do
not know if this is a general issue of jsrun or an issue of jsdoc-toolkit.

What version of the product are you using? On what operating system?
SVN trunk

Please provide any additional information below.
Using MacOSX and jEdit

Original issue reported on code.google.com by katz...@gmail.com on 31 Dec 2008 at 10:39

GoogleCodeExporter commented 8 years ago
IO.includeDir (dfined in app/run.js) will include ALL files in the lib 
directory, regardless of whether they were 
create by you or your text editor. "Walker.js~" is being loaded after 
"Walker.js" so is overwriting the real file.

Make the following change to app/run.js

338c338
<                      load(lib[i]);
---
>                      if (/\.js$/i.test(lib[i])) load(lib[i]);

Or modify JEdit's preferences to stop creating scratch files in same directory 
as the source file.

Or use BBEdit instead (my personal favorite).

Committed revision 754.

Original comment by micmath on 31 Dec 2008 at 2:45