tedious / JShrink

Javascript Minifier built in PHP
http://www.tedivm.com
BSD 3-Clause "New" or "Revised" License
751 stars 152 forks source link

static string concatenation #55

Closed the-liquid-metal closed 1 year ago

the-liquid-metal commented 8 years ago

also statement like this:

template = '' + '<div class="row">' + '<h1>{{TITLE}}</h1>' + '</div>' + '<div class="row">' + '<div class="alert alert-warning" role="alert">{{RESPONSE_TEXT}}</div>' + '</div>';

into

template = '<div class="row"><h1>{{TITLE}}</h1></div><div class="row"><div class="alert alert-warning" role="alert">{{RESPONSE_TEXT}}</div></div>';

tedivm commented 1 year ago

After a lot of thought I've decided that jshrink isn't going to take on this type of task- it removes whitespace, but moving into actual rewriting of code raises complexity and reduces performance.