Currently, I'm using Closure Compiler just on the javascript file. Now I also want to minify and rename the CSS classes with shorter names.
Is there a way to avoid having to rewrite every jquery CSS string-based selector in my .js file (ie. $('#SomeID')
or $('.SomeClass'))
to a variable-based selector? Since most of the HTML is actually generated at runtime, I could easily moved the skeleton HTML that's initially in the page to the .js file and have the document.ready function first put the skeleton HTML needed for the app on the page. Would that avoid the rewriting of the CSS selectors or would the selectors still need to be rewritten as properties of an object?
The doc is here but I didn't find it clear http://code.google.com/p/closure-stylesheets/#Renaming
Thanks for your suggestions.