문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
|
gradle:javascript [2012/10/23 16:23] kwon37xi |
gradle:javascript [2012/10/23 17:58] (현재) kwon37xi [gradle-js-plugin] |
||
|---|---|---|---|
| 줄 3: | 줄 3: | ||
| ====== gradle-js-plugin ====== | ====== gradle-js-plugin ====== | ||
| * http:// | * http:// | ||
| + | * [[javascript: | ||
| ====== gradle-jslint-plugin ====== | ====== gradle-jslint-plugin ====== | ||
| * https:// | * https:// | ||
| - | ====== Closure Compiler API ====== | ||
| - | * [[https:// | ||
| - | <code groovy> | ||
| - | void minifyJsFile(final Set< | ||
| - | final String warningLevel, | ||
| - | Compiler compiler = new Compiler() | ||
| - | CompilationLevel.valueOf(compilationLevel).setOptionsForCompilationLevel(options) | ||
| - | WarningLevel level = WarningLevel.valueOf(warningLevel) | ||
| - | level.setOptionsForWarningLevel(options) | ||
| - | List< | ||
| - | if (externsFiles.size()) { | ||
| - | externs.addAll(externsFiles.collect() { JSSourceFile.fromFile(it) }) | ||
| - | } | ||
| - | List< | ||
| - | inputFiles.each { inputFile -> | ||
| - | inputs.add(JSSourceFile.fromFile(inputFile)) | ||
| - | } | ||
| - | Result result = compiler.compile(externs, | ||
| - | if (result.success) { | ||
| - | outputFile.write(compiler.toSource()) | ||
| - | } else { | ||
| - | result.errors.each { | ||
| - | println " | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | </ | ||