Todo list

known issues and future improvements.

[ all ] [ bugs ] [ enhancements ] [ features ] [ closed ]
  • Make JSXS be compatible with JavaScript 1.7 and E4X
    Introduce let and yield statements.
    enhancement; priority 1/5.
  • Concat variable declaration in same function (if final is more short)
    var a = 'a'; a += 'a'; var b = a; 
    to :
    var a = 'a',b; a += 'a'; b = a; 
    feature; priority 4/5.
  • Detect redundant value assigned by reference for add variable who factorize that
    var h = document.location.host,
    q = document.location.search,
    i = document.getElementById('myid');
    to :
    var a = document,
    b = a.location,
    h = b.host,
    q = b.search,
    i = a.getElementById('myid');
    feature; priority 4/5.
  • Remove bloc statement ({...}) but leave semicolon in if .. else and some others statements
    if (condition) { statement1; } else { statement2; }
    to :
    if (condition) statement1; else statement2; 
    feature; priority 3/5.
  • Parse "with" statement
    with (object) { object.attribute... ... }
    Actualy all the codes that it reports probably a syntax error.
    feature; priority 2/5.
  • Reduce varname in "catch" statement
    try { ... } catch (myvar) { myvar... }
    to :
    try { ... } catch (a) { a... }
    enhancement; priority 1/5.
  • Fix option "compatibility"
    This doesn't work if shrink option is desactivated.
    bug; priority 3/5.
  • Convert object property string defined
    var a = { 'test': 69, "69": 'test' };
    to :
    var a = { test: 69, 69: 'test' };
    feature; priority 3/5.
  • Reduce condition if true value
    var a = 'something'; if (a == true) { ... }
    to :
    var a='something';if(a){...}
    and
    if (true) { ... }
    to :
    if (1) {...}
    feature; priority 3/5.
  • Advanced reduce logical condition according to operator precedence and priority
    while ( (a = (b || true)) || (b != (a > 3) && b < 4)) { ... }
    to :
    while ( (a = b || true) || b != a > 3 && b < 4) { ... }
    feature; priority 2/5.
  • Detect redundant string value and assign to variable (if final is more short)
    if(a = "a value string" && b = "a value string"){}
    to :
    var c = "a value string";
    if(a = c && b = c){}
    feature; priority 3/5.
  • Remove semicolumn between do-while when compatibility option is actived
    This produce a syntax error, result is :
    do { ... }; while (...)
    bug; closed in v0.7.1
  • make a CLI
    php jsxs-cli.php -f script.js
    feature; priority 5/5.
Comments
posted by Tomap at 2009-07-13 12:50:05
At last, someone is getting further than YUI Compressor !!
Great!
You could add to your "todo list" :
fartorise string is necessary
like :
if(typeof a = "string" && typeof b = "string")
>> to :
var c = "string"
if(typeof a = c && typeof b = c)
posted by Xorax at 2009-07-17 02:42:31
Thx ! It's added ;)