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)
38
38
'jar_file ' => __DIR__ .'/vendor/closure-compiler/compiler.jar ' ,
39
39
'output_path ' => '/ ' ,
40
40
'optimization ' => 'SIMPLE_OPTIMIZATIONS ' ,
41
- 'charset ' => 'utf-8 '
41
+ 'charset ' => 'utf-8 ' ,
42
+ 'sort ' => true ,
42
43
);
43
44
44
45
$ this ->options = array_merge ($ this ->options ,$ options );
@@ -127,7 +128,11 @@ public function exec($filename = 'all.min.js')
127
128
128
129
$ this ->js_files = array_unique ($ this ->js_files );
129
130
130
- sort ($ this ->js_files );
131
+ $ opt = $ this ->_get_options ();
132
+
133
+ if ($ opt ['sort ' ]) {
134
+ sort ($ this ->js_files );
135
+ }
131
136
132
137
$ num_js = count ($ this ->js_files );
133
138
@@ -346,4 +351,4 @@ private function _get_options()
346
351
}
347
352
348
353
}
349
- ?>
354
+ ?>
You can’t perform that action at this time.
0 commit comments