<div>Just remember to use best practices in doing so.</div><div> * If you minify the file rather than just strippings comments, don't munge it. To keep people happy, mentioning in the dev version what compressor and settings were used would probably be appreciated.<br>
</div><div> * Default to the minified/commentless file, but enqueue the dev version when the SCRIPT_DEBUG constant is set, this is what core uses to use the non-minified files, makes it easier to debug that way IMO.</div>
<div>(Those apply to plugins as equally as to Themes)</div><div><br></div><div class="gmail_quote">On 5 July 2011 13:24, Chip Bennett <span dir="ltr"><<a href="mailto:chip@chipbennett.net">chip@chipbennett.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">All else being equal and being implemented properly, I don't see any<br>
reason why that should cause a problem.<br>
<br>
Given that you're not actually required to provide a version of the JS<br>
file with inline documentation (i.e. the condensed version would be<br>
perfectly valid on its own), providing a second, documented version is<br>
an example of going above and beyond. IMHO anything that adds<br>
documentation to a Theme should be encouraged.<br>
<br>
Chip<br>
<div><div class="h5"><br>
On 7/4/11, Michael Fields <<a href="mailto:michael@mfields.org">michael@mfields.org</a>> wrote:<br>
> I've been working on integrating some javascript functionality into my next<br>
> public theme. Thing is, I've grown quite accustomed to documenting my code<br>
> over the past year and this applies to javascript as well. The file in<br>
> question is almost 200 lines long and I only see it grown. Fully documented,<br>
> it could easily become 3-400 lines. I'm projecting about 50% of the code<br>
> will be documentation when all is said and done.<br>
><br>
> I would like to include it into the theme much the same way that WordPress<br>
> included js. Having a "dev" version and a "live" version. The live version<br>
> would contain the same functional code minus excess whitespace and comments.<br>
> I would not use any compression or package application to obfuscate the<br>
> code.<br>
><br>
> Just wondering if this is something that would pass theme review. I know<br>
> questions like this have been asked before, but I honestly can not remember<br>
> the outcome.<br>
><br>
> Here's the script:<br>
> <a href="https://github.com/mfields/nighthawk/blob/master/dropdowns.js" target="_blank">https://github.com/mfields/nighthawk/blob/master/dropdowns.js</a><br>
><br>
> Best wishes,<br>
> -Mike<br>
> _______________________________________________<br>
> theme-reviewers mailing list<br>
> <a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
> <a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
><br>
<br>
</div></div><font color="#888888">--<br>
Sent from my mobile device<br>
</font><div><div class="h5">_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
</div></div></blockquote></div><br>