UIZE JavaScript Framework

TO DO - Uize.Build.Scruncher

This is a TO DO document for the Uize.Build.Scruncher module.

allow the first block of comments in a document to consist of comment lines that are started with a "//"

1. - provide more info in reports

time elapsed
speed (size/second)

2. - further code size optimization

allow for flagging concise header comments for concise output mode
last semicolon before close brace not needed

3. - misc improvements

allow "ScruncherSettings" directive to have space between itself and comment start chars

4. - error reports

4.1. - an option for evaluating libraries before and after they are scrunched, and reporting the position in the source code for syntax errors

4.1.1. - pre-scrunch

4.1.1.1. - IE-specific

trailing comma in JSON object or multi-line var statement that is not OK in IE

4.1.2. - post-scrunch

4.1.2.1. - missing comma in multi-line var statement

ok in unscrunched code, because the JavaScript interpreter accepts a linebreak as a terminator

EXAMPLE

var
  blah = 1234
  blahBlah = 123
;

4.1.2.2. - missing semi-colon after any statement (but often method assignments)

ok in unscrunched code, because the JavaScript interpreter accepts a linebreak as a terminator

EXAMPLE

_object.myMethod1 = function () {
  // ... ... ...
}
_object.myMethod2 = function () {
  // ... ... ...
};
implementation idea: map each line+char in scrunched code to line+char in source

5. - idea: ability to find error in source file

5.1. - deal with the following two cases...

error is in scrunched module that is part of library file
error is in scrunched module that is discretely loaded