[theme-reviewers] Heavily Commented Javascript Files.

Otto otto at ottodestruct.com
Tue Jul 5 03:42:09 UTC 2011


BTW, it would be nice if you specified how you were going to compress
it in the comments or something. We don't want a case where somebody
compresses something with malware in it, and then nobody notices. Your
results should be reproducible.

-Otto



On Mon, Jul 4, 2011 at 10:32 PM, Michael Fields <michael at mfields.org> wrote:
> Thanks for the tips! I knew about the enqueue part already, but adding the
> compressor info was not something that I really considered. Will definitely
> do this for release. Can you suggest a good compressor to use that is in
> compliance with theme review standards?
> Thanks!
> -Mike
>
> On Jul 4, 2011, at 8:28 PM, Dion Hulse (dd32) wrote:
>
> Just remember to use best practices in doing so.
>  * 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.
>  * 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.
> (Those apply to plugins as equally as to Themes)
> On 5 July 2011 13:24, Chip Bennett <chip at chipbennett.net> wrote:
>>
>> All else being equal and being implemented properly, I don't see any
>> reason why that should cause a problem.
>>
>> Given that you're not actually required to provide a version of the JS
>> file with inline documentation (i.e. the condensed version would be
>> perfectly valid on its own), providing a second, documented version is
>> an example of going above and beyond. IMHO anything that adds
>> documentation to a Theme should be encouraged.
>>
>> Chip
>>
>> On 7/4/11, Michael Fields <michael at mfields.org> wrote:
>> > I've been working on integrating some javascript functionality into my
>> > next
>> > public theme. Thing is, I've grown quite accustomed to documenting my
>> > code
>> > over the past year and this applies to javascript as well. The file in
>> > question is almost 200 lines long and I only see it grown. Fully
>> > documented,
>> > it could easily become 3-400 lines. I'm projecting about 50% of the code
>> > will be documentation when all is said and done.
>> >
>> > I would like to include it into the theme much the same way that
>> > WordPress
>> > included js. Having a "dev" version and a "live" version. The live
>> > version
>> > would contain the same functional code minus excess whitespace and
>> > comments.
>> > I would not use any compression or package application to obfuscate the
>> > code.
>> >
>> > Just wondering if this is something that would pass theme review. I know
>> > questions like this have been asked before, but I honestly can not
>> > remember
>> > the outcome.
>> >
>> > Here's the script:
>> > https://github.com/mfields/nighthawk/blob/master/dropdowns.js
>> >
>> > Best wishes,
>> > -Mike
>> > _______________________________________________
>> > theme-reviewers mailing list
>> > theme-reviewers at lists.wordpress.org
>> > http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>> >
>>
>> --
>> Sent from my mobile device
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>


More information about the theme-reviewers mailing list