library/Garp/Assets/Minifier.php
public function minifyJs($sourceFileList, $targetFile) {
        $sourceFileList = (array)$sourceFileList;
        $sourceFileList = array_map(array($this, '_createFullPath'), $sourceFileList);
        $sourceFileList = implode(' ', $sourceFileList);
        $targetFile = $this->_createFullPath($targetFile);

        $uglifyJsCommand = 'uglifyjs '.$sourceFileList.' -o '.$targetFile.' -c -m';
        `$uglifyJsCommand`;
    }
public function minifyJs($sourceFileList, $targetFile) {
        $sourceFileList = (array)$sourceFileList;
        $sourceFileList = array_map(array($this, '_createFullPath'), $sourceFileList);
        $sourceFileList = implode(' ', $sourceFileList);
        $targetFile = $this->_createFullPath($targetFile);

        $uglifyJsCommand = 'uglifyjs '.$sourceFileList.' -o '.$targetFile.' -c -m';
        `$uglifyJsCommand`;
    }
public function minifyJs ( $ sourceFileList , $ targetFile ) { $ sourceFileList = ( array ) $ sourceFileList ; $ sourceFileList = array_map ( array ( $ this , '_createFullPath' ) , $ sourceFileList ) ; $ sourceFileList = implode ( ' ' , $ sourceFileList ) ; $ targetFile = $ this -> _createFullPath ( $ targetFile ) ; $ uglifyJsCommand = 'uglifyjs ' . $ sourceFileList . ' -o ' . $ targetFile . ' -c -m' ; `$uglifyJsCommand` ; }
Minify and concat a bunch of Javascript files into one
tiny little file.
@param Array|String $sourceFileList The original files
@param String $targetFile The target filename
@return Boolean
@todo Add option that suppresses output
Minify and concat a bunch of Javascript files into one tiny little file .