You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2016/09/21 13:29:10 UTC

svn commit: r1761731 - in /myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond: ./ src/main/resources/META-INF/ src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/scss/ src/main/resources/org/apache/myfaces/tobago/renderk...

Author: lofwyr
Date: Wed Sep 21 13:29:09 2016
New Revision: 1761731

URL: http://svn.apache.org/viewvc?rev=1761731&view=rev
Log:
TOBAGO-1601: Building the different themes (scarborough, speyside, ...) like bootstrap builds
* download bootstrap und build the theme with that.

Added:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/scss/
    myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/scss/_custom.scss
Removed:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/
Modified:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/pom.xml
    myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/META-INF/tobago-config.xml

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/pom.xml?rev=1761731&r1=1761730&r2=1761731&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/pom.xml (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/pom.xml Wed Sep 21 13:29:09 2016
@@ -15,8 +15,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
+
   <parent>
     <groupId>org.apache.myfaces.tobago</groupId>
     <artifactId>tobago-theme</artifactId>
@@ -25,25 +27,152 @@
   <artifactId>tobago-theme-richmond</artifactId>
   <packaging>jar</packaging>
   <name>Tobago Theme Richmond</name>
+
+  <properties>
+    <bootstrap.version>4.0.0-alpha.4</bootstrap.version>
+  </properties>
+
   <build>
     <plugins>
+
+      <plugin>
+        <artifactId>maven-scm-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>copy-bootstrap</id>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>checkout</goal>
+            </goals>
+            <configuration>
+              <connectionUrl>scm:git:https://github.com/twbs/bootstrap</connectionUrl>
+              <skipCheckoutIfExists>true</skipCheckoutIfExists>
+              <scmVersion>v${bootstrap.version}</scmVersion>
+              <scmVersionType>branch</scmVersionType>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
       <plugin>
-        <groupId>net.alchim31.maven</groupId>
-        <artifactId>yuicompressor-maven-plugin</artifactId>
+        <artifactId>maven-resources-plugin</artifactId>
         <executions>
           <execution>
+            <id>copy-bootstrap</id>
+            <phase>generate-resources</phase>
             <goals>
-              <goal>compress</goal>
+              <goal>copy-resources</goal>
             </goals>
+            <configuration>
+              <outputDirectory>${project.build.directory}/bootstrap</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>${project.build.directory}/checkout</directory>
+                  <exclude>scss/_custom.scss</exclude>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+          <execution>
+            <id>copy-custom</id>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${project.build.directory}/bootstrap</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard</directory>
+                  <includes>
+                    <include>scss/*</include>
+                  </includes>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+          <execution>
+            <id>copy-bootstrap-dist</id>
+            <phase>process-resources</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>
+                ${project.build.directory}/classes/org/apache/myfaces/tobago/renderkit/html/richmond/standard/bootstrap/${bootstrap.version}-richmond
+              </outputDirectory>
+              <resources>
+                <resource>
+                  <directory>${project.build.directory}/bootstrap/dist</directory>
+                </resource>
+              </resources>
+            </configuration>
           </execution>
         </executions>
+      </plugin>
+
+      <plugin>
+        <groupId>com.github.eirslett</groupId>
+        <artifactId>frontend-maven-plugin</artifactId>
+        <version>1.0</version>
+
+        <!-- optional -->
         <configuration>
-          <suffix>.min</suffix>
-          <excludes>
-            <exclude>**/*.js</exclude>
-          </excludes>
+          <nodeVersion>v6.5.0</nodeVersion>
+          <npmVersion>3.10.8</npmVersion>
+          <!-- optional: where to download node and npm from. Defaults to https://nodejs.org/dist/ -->
+          <!--<downloadRoot>http://myproxy.example.org/nodejs/dist/</downloadRoot>-->
+          <!-- optional: where to install node and npm. Defaults to the working directory -->
+          <installDirectory>${project.build.directory}/frontend</installDirectory>
+          <workingDirectory>${project.build.directory}/bootstrap</workingDirectory>
         </configuration>
+
+        <executions>
+
+          <execution>
+            <id>install node and npm</id>
+            <goals>
+              <goal>install-node-and-npm</goal>
+            </goals>
+            <phase>generate-resources</phase>
+          </execution>
+
+          <execution>
+            <id>npm install grunt-cli</id>
+            <goals>
+              <goal>npm</goal>
+            </goals>
+            <phase>generate-resources</phase>
+            <configuration>
+              <arguments>install grunt-cli</arguments>
+            </configuration>
+          </execution>
+
+          <execution>
+            <id>npm install</id>
+            <goals>
+              <goal>npm</goal>
+            </goals>
+            <phase>generate-resources</phase>
+            <configuration>
+              <arguments>install</arguments>
+            </configuration>
+          </execution>
+
+          <execution>
+            <id>grunt build</id>
+            <goals>
+              <goal>grunt</goal>
+            </goals>
+            <phase>generate-resources</phase>
+            <configuration>
+              <arguments>dist</arguments>
+            </configuration>
+          </execution>
+
+        </executions>
       </plugin>
+
     </plugins>
   </build>
 
@@ -59,4 +188,5 @@
       <version>${project.version}</version>
     </dependency>
   </dependencies>
+
 </project>

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/META-INF/tobago-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/META-INF/tobago-config.xml?rev=1761731&r1=1761730&r2=1761731&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/META-INF/tobago-config.xml (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/META-INF/tobago-config.xml Wed Sep 21 13:29:09 2016
@@ -35,26 +35,22 @@
       <resource-path>org/apache/myfaces/tobago/renderkit</resource-path>
       <fallback>standard</fallback>
       <versioned>true</versioned>
-<!--
       <resources production="true">
         <excludes>
           <script name="bootstrap/4.0.0-alpha.4/js/bootstrap.js"/>
           <style name="bootstrap/4.0.0-alpha.4/css/bootstrap.css"/>
         </excludes>
-        <script name="bootstrap-richmond/3.3.6/js/bootstrap.js"/>
-        <style name="bootstrap-richmond/3.3.6/css/bootstrap.css"/>
-        <style name="bootstrap-richmond/3.3.6/css/bootstrap-theme.css"/>
+        <script name="bootstrap/4.0.0-alpha.4-richmond/js/bootstrap.js"/>
+        <style name="bootstrap/4.0.0-alpha.4-richmond/css/bootstrap.css"/>
       </resources>
       <resources production="false">
         <excludes>
           <script name="bootstrap/4.0.0-alpha.4/js/bootstrap.js"/>
           <style name="bootstrap/4.0.0-alpha.4/css/bootstrap.css"/>
         </excludes>
-        <script name="bootstrap-richmond/3.3.6/js/bootstrap.js"/>
-        <style name="bootstrap-richmond/3.3.6/css/bootstrap.css"/>
-        <style name="bootstrap-richmond/3.3.6/css/bootstrap-theme.css"/>
+        <script name="bootstrap/4.0.0-alpha.4-richmond/js/bootstrap.js"/>
+        <style name="bootstrap/4.0.0-alpha.4-richmond/css/bootstrap.css"/>
       </resources>
--->
     </theme-definition>
   </theme-definitions>
 </tobago-config>

Added: myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/scss/_custom.scss
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/scss/_custom.scss?rev=1761731&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/scss/_custom.scss (added)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/scss/_custom.scss Wed Sep 21 13:29:09 2016
@@ -0,0 +1,13 @@
+// Bootstrap overrides
+//
+// Copy variables from `_variables.scss` to this file to override default values
+// without modifying source files.
+
+$brand-primary:             #ffd080 !default;
+$brand-success:             #bcf8ac !default;
+$brand-info:                #00ffff !default;
+$brand-warning:             #f0fd4e !default;
+$brand-danger:              #ffa9a9 !default;
+
+$body-bg:    #eceeef !default;
+$body-color: #0265c8 !default;