Microsoft Ajax Minifier 1.1. How to use hypercrunch programmatically?

Feb 11, 2011 at 8:42 PM
Edited Feb 11, 2011 at 8:49 PM

Could please someone tell me how to use hypercrunch programmatically? I looked into the help file and it says "There is no way to programmatically determine at parse time if the string will declare more variables or functions" so does it means that it's not possible to hypercrunch programmatically?

Using ajaxmin.dll this is the code I wrote. The variable "content" is a string that contains the javascript code.

                ScriptCruncher cruncher = new ScriptCruncher();
                CodeSettings settings = new CodeSettings();
                settings.OutputMode = OutputMode.SingleLine;
                settings.InlineSafeStrings = true;
                settings.RemoveUnneededCode = true;
                settings.CollapseToLiteral = true;
                settings.EvalsAreSafe = true;
                settings.InlineSafeStrings = true;
                //supposedly -> settings.Hypercrunch = true;
                content = cruncher.Crunch(content, settings);

Thank you very much.