closure-compiler-maven-plugin

Google Closure Compiler Maven plugin

Лицензия

Лицензия

Категории

Категории

Maven Компиляция и сборка
Группа

Группа

com.github.pukkaone
Идентификатор

Идентификатор

closure-compiler-maven-plugin
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

closure-compiler-maven-plugin
Google Closure Compiler Maven plugin
Ссылка на сайт

Ссылка на сайт

https://github.com/pukkaone/closure-compiler-maven-plugin
Система контроля версий

Система контроля версий

https://github.com/pukkaone/closure-compiler-maven-plugin

Скачать closure-compiler-maven-plugin

Как подключить последнюю версию

<plugin>
    <groupId>com.github.pukkaone</groupId>
    <artifactId>closure-compiler-maven-plugin</artifactId>
    <version>1.0.0</version>
</plugin>

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.apache.maven : maven-plugin-api jar 3.0.4
com.google.javascript : closure-compiler jar r2388

Модули Проекта

Данный проект не имеет модулей.

Google Closure Compiler Maven Plugin

This project is forked from https://github.com/gli/closure-compiler-maven-plugin to implement additional features.

Entry point configuration

Configure the plugin to include only transitive dependencies of specified entry points.

<entryPoints>
  <entryPoint>application.Main</entryPoint>
</entryPoints>

goog.require returns namespace

Patched Closure Compiler so goog.require can appear inside goog.scope, and goog.require returns the namespace so you can assign it to a variable. For example:

goog.provide('some.Example');

goog.scope(function() {
  var Vec2 = goog.require('goog.math.Vec2');

  some.Example = function() {
    console.log(new Vec2());
  };
});

See https://code.google.com/p/closure-compiler/issues/detail?id=674

Configure Your Maven Project To Use Plugin

<properties>
  <closure.source>src/main/js</closure.source>
  <closure.externs>src/main/externs</closure.externs>
  <closure.outputFile>${project.build.directory}/compiled.js</closure.outputFile>
</properties>

<build>
  <plugins>
    <!-- ... -->

    <plugin>
      <groupId>com.github.pukkaone</groupId>
      <artifactId>closure-compiler-maven-plugin</artifactId>
      <version>1.0.0</version>
      <executions>
        <execution>
          <phase>process-resources</phase>
          <goals>
            <goal>compile</goal>
          </goals>
        </execution>
      </executions>
      <configuration>
        <sourceDirectory>${closure.source}</sourceDirectory>
        <externsSourceDirectory>${closure.externs}</externsSourceDirectory>
        <entryPoints>
          <entryPoint>application.Main</entryPoint>
        </entryPoints>
        <outputFile>${closure.outputFile}</outputFile>
        <compilationLevel>SIMPLE_OPTIMIZATIONS</compilationLevel>
        <merge>true</merge>
        <loggingLevel>WARNING</loggingLevel>
        <warningLevel>VERBOSE</warningLevel>
        <generateExports>true</generateExports>
        <addDefaultExterns>true</addDefaultExterns>
        <logExternFiles>true</logExternFiles>
        <logSourceFiles>true</logSourceFiles>
        <stopOnErrors>true</stopOnErrors>
        <stopOnWarnings>true</stopOnWarnings>
      </configuration>
    </plugin>

    <!-- ... -->
  </plugins>
</build>

Версии библиотеки

Версия
1.0.0