public CompressionResult compress ( String scriptSource ) { Object result = null ; StopWatch stopWatch = new StopWatch ( ) ; stopWatch . start ( "Compressing using Uglify" ) ; try { result = jsEngine . invokeFunction ( "minify" , scriptSource , options ) ; } catch ( NoSuchMethodException | ScriptException e ) { throw new BundlingProcessException ( e ) ; } stopWatch . stop ( ) ; if ( PERF_LOGGER . isDebugEnabled ( ) ) { PERF_LOGGER . debug ( stopWatch . prettyPrint ( ) ) ; } return ( CompressionResult ) result ; }
Invoke the uglyfication process on the given script code