JeffreyZhao/wind

Wind.compileBlock method for compile a whole code block

JeffreyZhao opened this issue · 0 comments

Usage:

Jscex.compileBlock(options /* or name */, function () {
    /* code block */
});

The name would be used in "//@ sourceURL".

Assign a better name for generated function:

  • Use the function name if it's not a anonymous method.
  • Use the Jason name if it's created like this: myFunc: eval(...)
  • Use the variable name if it's assigned to a variable: var myFunc = eval(...) or myFunc = eval(...)
  • Use the field name if it's assigned to a field name: a.myFunc = eval(...)