twobob / jsdoc-toolkit

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

The source generation/highlighting isn't very flexible. #269

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Rather than tweak the source for publishSrcHilite.js to change the styles, I'd 
like to be able to use 
static files from my template.

The attached diff uses code-header.html and code-footer.html from the template 
static folder. I've 
added a simple version of these files for files.

Original issue reported on code.google.com by jeff%met...@gtempaccount.com on 23 Nov 2009 at 12:51

Attachments:

GoogleCodeExporter commented 8 years ago
Not sure what I think about this one. Isn't creating your own plugin as easy as 
creating a new template? Why 
can't you just create your own source code generation plugin based on the 
existing one?

Original comment by micmath on 23 Nov 2009 at 9:43

GoogleCodeExporter commented 8 years ago
Well, I don't want to modify the default jsdoc-toolkit installation. So I was 
trying to enhance the existing plugin, 
which I think will execute regardless of whether I create an additional plugin.

I also suspect that many folks are more likely to update some HTML & CSS rather 
than write a plugin.

Original comment by jeff%met...@gtempaccount.com on 23 Nov 2009 at 11:59

GoogleCodeExporter commented 8 years ago
The publishWrcHilite plugin is only ever called from the jsdoc template, so I 
consider it to be part of the 
template, which admittedly is in the "default installation". I very strongly 
encourage people to make their own 
templates, so I don't really mind that the standard one is inflexible. That 
said, I see your point about the header, 
footer. I may implement it slightly differently though. Thinks...

Original comment by micmath on 24 Nov 2009 at 9:35

GoogleCodeExporter commented 8 years ago
Ah, if this functionality is considered to be a part of the template, then I 
could just fold it into my template 
(which is located outside the standard jsdoc-toolkit distribution).

It might be worth considering moving some of the plugins into a samples folder, 
since I'm certain executing even 
empty plugins adds up to significant CPU cycles when documenting a large 
project.

Maybe the right answer here is to make a source.tmpl file and pour the 
formatted code into that...

Original comment by jeff%met...@gtempaccount.com on 24 Nov 2009 at 2:22