cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1212795 - in /cocoon/trunk/site/cocoon-thien-maven-site-skin: pom.xml src/main/resources/META-INF/maven/site.vm
Date Sat, 10 Dec 2011 14:04:31 GMT
Author: simonetripodi
Date: Sat Dec 10 14:04:30 2011
New Revision: 1212795

URL: http://svn.apache.org/viewvc?rev=1212795&view=rev
Log:
minified css/js resources

Modified:
    cocoon/trunk/site/cocoon-thien-maven-site-skin/pom.xml
    cocoon/trunk/site/cocoon-thien-maven-site-skin/src/main/resources/META-INF/maven/site.vm

Modified: cocoon/trunk/site/cocoon-thien-maven-site-skin/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/site/cocoon-thien-maven-site-skin/pom.xml?rev=1212795&r1=1212794&r2=1212795&view=diff
==============================================================================
--- cocoon/trunk/site/cocoon-thien-maven-site-skin/pom.xml (original)
+++ cocoon/trunk/site/cocoon-thien-maven-site-skin/pom.xml Sat Dec 10 14:04:30 2011
@@ -48,7 +48,67 @@
           <include>LICENSE.txt</include>
         </includes>
       </resource>
+
+      <!-- exclude css and js since will include the minified version -->
+      <resource>
+        <directory>${basedir}/src/main/resources</directory>
+        <excludes>
+          <exclude>css/**</exclude>
+          <exclude>js/**</exclude>
+        </excludes>
+      </resource>
+
+      <!-- include the print.css -->
+      <resource>
+        <directory>${basedir}/src/main/resources</directory>
+        <includes>
+          <include>css/print.css</include>
+        </includes>
+      </resource>
+
+      <!-- include minified only -->
+      <resource>
+        <directory>${project.build.directory}/${project.build.finalName}</directory>
+        <includes>
+          <include>css/apache-cocoon-thien-maven-skin.min.css</include>
+          <include>js/apache-cocoon-thien-maven-skin.min.js</include>
+        </includes>
+      </resource>
     </resources>
+
+    <plugins>
+      <plugin>
+        <groupId>com.samaxes.maven</groupId>
+        <artifactId>maven-minify-plugin</artifactId>
+        <version>1.3.5</version>
+        <executions>
+          <execution>
+            <id>default-minify</id>
+            <phase>generate-resources</phase>
+            <configuration>
+              <webappSourceDir>${basedir}/src/main/resources</webappSourceDir>
+              <cssSourceDir>css</cssSourceDir>
+              <cssSourceFiles>
+                <cssSourceFile>maven-base.css</cssSourceFile>
+                <cssSourceFile>maven-theme.css</cssSourceFile>
+                <cssSourceFile>prettify.css</cssSourceFile>
+                <cssSourceFile>site.css</cssSourceFile>
+              </cssSourceFiles>
+              <cssFinalFile>apache-cocoon-thien-maven-skin.css</cssFinalFile>
+              <jsSourceDir>js</jsSourceDir>
+              <jsSourceFiles>
+                <jsSourceFile>getBlank.js</jsSourceFile>
+                <jsSourceFile>prettify.js</jsSourceFile>
+              </jsSourceFiles>
+              <jsFinalFile>apache-cocoon-thien-maven-skin.js</jsFinalFile>
+            </configuration>
+            <goals>
+              <goal>minify</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
   </build>
 
 </project>

Modified: cocoon/trunk/site/cocoon-thien-maven-site-skin/src/main/resources/META-INF/maven/site.vm
URL: http://svn.apache.org/viewvc/cocoon/trunk/site/cocoon-thien-maven-site-skin/src/main/resources/META-INF/maven/site.vm?rev=1212795&r1=1212794&r2=1212795&view=diff
==============================================================================
--- cocoon/trunk/site/cocoon-thien-maven-site-skin/src/main/resources/META-INF/maven/site.vm
(original)
+++ cocoon/trunk/site/cocoon-thien-maven-site-skin/src/main/resources/META-INF/maven/site.vm
Sat Dec 10 14:04:30 2011
@@ -209,15 +209,9 @@
 <html>
   <head>
     <title>#title()</title>
-    <style type="text/css" media="all">
-      @import url("$relativePath/css/maven-base.css");
-      @import url("$relativePath/css/maven-theme.css");
-      @import url("$relativePath/css/site.css");
-      @import url("$relativePath/css/prettify.css");
-    </style>
+    <link rel="stylesheet" href="$relativePath/css/apache-cocoon-thien-maven-skin.min.css"
/>
     <link rel="stylesheet" href="$relativePath/css/print.css" type="text/css" media="print"
/>
-    <script src="$relativePath/js/getBlank.js" language="javascript" type="text/javascript"></script>
-    <script src="$relativePath/js/prettify.js" language="javascript" type="text/javascript"></script>
+    <script src="$relativePath/js/apache-cocoon-thien-maven-skin.min.js" language="javascript"
type="text/javascript"></script>
     #foreach( $author in $authors )
       <meta name="author" content="$author" />
     #end



Mime
View raw message