PHP 클래스 Minify_YUICompressor, minify
You must set $jarFile and $tempDir before calling the minify functions.
Also, depending on your shell's environment, you may need to specify
the full path to java in $javaExecutable or use putenv() to setup the
Java environment.
Minify_YUICompressor::$jarFile = '/path/to/yuicompressor-2.4.6.jar';
Minify_YUICompressor::$tempDir = '/tmp';
$code = Minify_YUICompressor::minifyJs(
$code
,array('nomunge' => true, 'line-break' => 1000)
);
Note: In case you run out stack (default is 512k), you may increase stack size in $options:
array('stack-size' => '2048k')
파일 보기
프로젝트 열기: mrclay/minify
1 사용 예제들
공개 프로퍼티들
프로퍼티 |
타입 |
설명 |
|
$jarFile |
string |
Filepath of the YUI Compressor jar file. This must be set before
calling minifyJs() or minifyCss(). |
|
$javaExecutable |
string |
Filepath of "java" executable (may be needed if not in shell's PATH) |
|
$tempDir |
string |
Writable temp directory. This must be set before calling minifyJs()
or minifyCss(). |
|
공개 메소드들
비공개 메소드들
메소드 상세
Minify a Javascript string
프로퍼티 상세
Filepath of the YUI Compressor jar file. This must be set before
calling minifyJs() or minifyCss().
public static string $jarFile |
리턴 |
string |
|
$javaExecutable 공개적으로 정적으로 프로퍼티
Filepath of "java" executable (may be needed if not in shell's PATH)
public static string $javaExecutable |
리턴 |
string |
|
Writable temp directory. This must be set before calling minifyJs()
or minifyCss().
public static string $tempDir |
리턴 |
string |
|