dev-master
9999999-dev http://www.xorax.info/labs/jsxs/A Javascript compressor based on preg written in PHP.
MIT GPL-3.0
The Requires
- php >=5.1.0
by Martin PANEL
A Javascript compressor based on preg written in PHP.
Another Javascript compressor, written in PHP., (*1)
Test online at http://www.xorax.info/labs/jsxs/, (*2)
JSXS is in BETA test since 1 april 2009. Its possible the output compressed code not be a comptatible javascript code. Your browser can return a syntax error after the evaluation of it., (*3)
JSXS requires a minimum of php 5.1.0 . works on all plateforms., (*4)
See example file., (*5)
adding semicolumn if necessary : In javascript language, the end of line can be interpreted as a semicolumn, so your code without blankspace is probably wrong. This feature adds semicolumns for prevent syntax error., (*6)
remove multiple and unused semicolumn : Multiple ending semicolumn, and semicolumn before ending block are removed, except in for statements., (*7)
Uncompressed :, (*8)
``` javascript function test (arg1) { var func = function (arg1) { return arg1+2; } return 'your value' + ' : ' + arg1 + func(arg1); }, (*9)
Compressed : ``` javascript function test(b){var c=function(a){return a+2};return'your value : '+b+c(b)}
Result explained:, (*10)
A Javascript compressor based on preg written in PHP.
MIT GPL-3.0