私は jQuery プラグインを書いている最中で、一般的に使用される CSS プロパティ文字列を列挙型に置き換えて、スクリプトのサイズを縮小したいと考えています。ただし、Google の Closure Compiler はすべての文字列変数を文字列リテラルに置き換えます。たとえば、高度な最適化が選択されている場合:
これ
var x = "hey bob how are you doing";
alert(x);
alert(x);
alert(x);
alert(x);
戻り値
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");
JScrambler のような文字列圧縮プログラムを介してコードを送信せずに、私がやろうとしていることを行う正しい方法は何ですか?
前もって感謝します。