Merge pull request #154 from glyptodon/html2js

GUAC-1161: Pre-cache Angular templates during build.
This commit is contained in:
James Muehlner
2015-04-22 16:03:20 -07:00
3 changed files with 25 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
src/main/webapp/META-INF/
src/main/webapp/generated/
target/
*~

View File

@@ -97,6 +97,27 @@
</executions>
</plugin>
<!-- Pre-cache Angular templates with maven-angular-plugin -->
<plugin>
<groupId>com.keithbranton.mojo</groupId>
<artifactId>angular-maven-plugin</artifactId>
<version>0.3.2</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>html2js</goal>
</goals>
</execution>
</executions>
<configuration>
<sourceDir>${basedir}/src/main/webapp/app/</sourceDir>
<include>**/*.html</include>
<target>${basedir}/src/main/webapp/generated/templates-main/templates.js</target>
<prefix>app</prefix>
</configuration>
</plugin>
<!-- JS/CSS Minification Plugin -->
<plugin>
<groupId>com.samaxes.maven</groupId>
@@ -146,6 +167,7 @@
<jsSourceIncludes>
<jsSourceInclude>app/**/*.js</jsSourceInclude>
<jsSourceInclude>generated/**/*.js</jsSourceInclude>
</jsSourceIncludes>
<!-- Do not minify and include tests -->

View File

@@ -35,5 +35,6 @@ angular.module('index', [
'notification',
'pascalprecht.translate',
'rest',
'settings'
'settings',
'templates-main'
]);