You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by ml...@apache.org on 2013/08/01 16:52:17 UTC

[07/13] git commit: TAP5-2153 Adapt quickstart archetype generated sources to be bootstrap and 5.4 compatibile let use our own bootstrap from bootswatch flatly theme

TAP5-2153 Adapt quickstart archetype generated sources to be bootstrap and 5.4 compatibile
let use our own bootstrap from bootswatch flatly theme


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/5a9be602
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/5a9be602
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/5a9be602

Branch: refs/heads/master
Commit: 5a9be60264bc21aa807689b571a30c8002b33396
Parents: e9469dc
Author: Massimo Lusetti <ml...@apache.org>
Authored: Thu Aug 1 16:29:12 2013 +0200
Committer: Massimo Lusetti <ml...@apache.org>
Committed: Thu Aug 1 16:29:12 2013 +0200

----------------------------------------------------------------------
 .../src/main/java/services/AppModule.java       | 21 ++++++++++++++++++++
 1 file changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/5a9be602/quickstart/filtered/archetype-resources/src/main/java/services/AppModule.java
----------------------------------------------------------------------
diff --git a/quickstart/filtered/archetype-resources/src/main/java/services/AppModule.java b/quickstart/filtered/archetype-resources/src/main/java/services/AppModule.java
index bf3f4c7..87d645e 100644
--- a/quickstart/filtered/archetype-resources/src/main/java/services/AppModule.java
+++ b/quickstart/filtered/archetype-resources/src/main/java/services/AppModule.java
@@ -40,6 +40,7 @@ public class AppModule
     	// number), but may be further overriden by DevelopmentModule or QaModule 
     	// by adding the same key in the contributeApplicationDefaults method.
         configuration.override(SymbolConstants.APPLICATION_VERSION, "${version}");
+		configuration.override(SymbolConstants.PRODUCTION_MODE, false);
     }
 
     public static void contributeApplicationDefaults(
@@ -53,6 +54,26 @@ public class AppModule
         configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en");
     }
 
+	/**
+	 * Use annotation or method naming convention: <code>contributeApplicationDefaults</code>
+	 */
+	@Contribute(SymbolProvider.class)
+	@ApplicationDefaults
+	public static void setupEnvironment(MappedConfiguration<String, Object> configuration)
+	{
+		configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery");
+		configuration.add(SymbolConstants.BOOTSTRAP_ROOT, "context:mybootstrap");
+		configuration.add(SymbolConstants.MINIFICATION_ENABLED, true);
+	}
+
+	// This will override the bundled bootstrap version and will compile it at runtime
+	@Contribute(JavaScriptStack.class)
+	@Core
+	public static void overrideBootstrapCSS(OrderedConfiguration<StackExtension> configuration)
+	{
+		configuration.override("bootstrap.css",
+				new StackExtension(StackExtensionType.STYLESHEET, "context:mybootstrap/css/bootstrap.css"), "before:tapestry.css");
+	}
 
     /**
      * This is a service definition, the service will be named "TimingFilter". The interface,