File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ class Uglify extends Wrapper
11
11
protected $ concat = array ();
12
12
13
13
protected $ programs = array (
14
- 'js ' => 'uglify ' ,
15
- 'css ' => 'clean ' ,
14
+ 'js ' => array ( 'uglify-js/bin/ ' , ' uglifyjs ' ) ,
15
+ 'css ' => array ( 'clean-css/ ' , ' index.js ' ) ,
16
16
);
17
17
18
18
public function __construct ($ file )
@@ -87,15 +87,15 @@ public function write($path)
87
87
public function compile ()
88
88
{
89
89
$ language = $ this ->getMode ();
90
- $ program = $ this ->programs [$ language ];
90
+ list ( $ programDirectory , $ programFile ) = $ this ->programs [$ language ];
91
91
$ name = $ this ->path ? basename ($ this ->path ) : null ;
92
92
93
93
$ path = sys_get_temp_dir () . DIRECTORY_SEPARATOR . $ name ;
94
94
file_put_contents ($ path , $ this ->getSource ());
95
95
96
96
return $ this ->execModuleScript (
97
- $ program . ' - ' . $ language ,
98
- ' bin/ ' . $ program . $ language ,
97
+ $ programDirectory ,
98
+ $ programFile ,
99
99
escapeshellarg ($ path )
100
100
);
101
101
}
You can’t perform that action at this time.
0 commit comments