File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ public function __construct($options)
3838 'jar_file ' => __DIR__ .'/vendor/closure-compiler/compiler.jar ' ,
3939 'output_path ' => '/ ' ,
4040 'optimization ' => 'SIMPLE_OPTIMIZATIONS ' ,
41- 'charset ' => 'utf-8 '
41+ 'charset ' => 'utf-8 ' ,
42+ 'sort ' => true ,
4243 );
4344
4445 $ this ->options = array_merge ($ this ->options ,$ options );
@@ -127,7 +128,11 @@ public function exec($filename = 'all.min.js')
127128
128129 $ this ->js_files = array_unique ($ this ->js_files );
129130
130- sort ($ this ->js_files );
131+ $ opt = $ this ->_get_options ();
132+
133+ if ($ opt ['sort ' ]) {
134+ sort ($ this ->js_files );
135+ }
131136
132137 $ num_js = count ($ this ->js_files );
133138
@@ -346,4 +351,4 @@ private function _get_options()
346351 }
347352
348353}
349- ?>
354+ ?>
You can’t perform that action at this time.
0 commit comments