I'm in the middle of writing a jQuery plugin, and I'd like to shrink the size of my script by replacing commonly used CSS property strings with enums. However, Google's Closure Compiler replaces all string variables with string literals. For example, with advanced optimization selected:
this
var x = "hey bob how are you doing";
alert(x);
alert(x);
alert(x);
alert(x);
returns
alert("hey bob how are you doing");alert("hey bob how are you doing");alert("hey bob how are you doing");alert("hey bob how are you doing");
What is the right way to do what I'm trying to do without sending my code through a string compressor like JScrambler?
Thanks in advance.