forked from Archives/Athou_commafeed
run sass plugin at build time, should fix openshift deployment issues
This commit is contained in:
36
pom.xml
36
pom.xml
@@ -155,21 +155,6 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>com.github.searls</groupId>
|
|
||||||
<artifactId>jasmine-maven-plugin</artifactId>
|
|
||||||
<version>1.3.1.0</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>test</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
<jsTestSrcDir>${project.basedir}/src/test/javascript/specs</jsTestSrcDir>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
@@ -492,6 +477,23 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>ro.isdc.wro4j</groupId>
|
||||||
|
<artifactId>wro4j-maven-plugin</artifactId>
|
||||||
|
<version>1.6.3</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<targetGroups>all</targetGroups>
|
||||||
|
<wroManagerFactory>ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory</wroManagerFactory>
|
||||||
|
<destinationFolder>${basedir}/target/generated-sources/wro4j/</destinationFolder>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
<version>2.3</version>
|
<version>2.3</version>
|
||||||
@@ -501,6 +503,10 @@
|
|||||||
<directory>target/generated-sources/angularjs/</directory>
|
<directory>target/generated-sources/angularjs/</directory>
|
||||||
<targetPath>templates</targetPath>
|
<targetPath>templates</targetPath>
|
||||||
</resource>
|
</resource>
|
||||||
|
<resource>
|
||||||
|
<directory>target/generated-sources/wro4j/</directory>
|
||||||
|
<targetPath>static</targetPath>
|
||||||
|
</resource>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/script/</directory>
|
<directory>src/main/script/</directory>
|
||||||
<includes>
|
<includes>
|
||||||
|
|||||||
@@ -100,8 +100,8 @@ public abstract class BasePage extends WebPage {
|
|||||||
if (getApplication().getConfigurationType() == RuntimeConfigurationType.DEPLOYMENT) {
|
if (getApplication().getConfigurationType() == RuntimeConfigurationType.DEPLOYMENT) {
|
||||||
long startupTime = startupBean.getStartupTime();
|
long startupTime = startupBean.getStartupTime();
|
||||||
String suffix = "?" + startupTime;
|
String suffix = "?" + startupTime;
|
||||||
response.render(JavaScriptHeaderItem.forUrl("wro/all.js" + suffix));
|
response.render(JavaScriptHeaderItem.forUrl("static/all.js" + suffix));
|
||||||
response.render(CssHeaderItem.forUrl("wro/all.css" + suffix));
|
response.render(CssHeaderItem.forUrl("static/all.css" + suffix));
|
||||||
} else {
|
} else {
|
||||||
response.render(JavaScriptHeaderItem.forUrl("wro/lib.js"));
|
response.render(JavaScriptHeaderItem.forUrl("wro/lib.js"));
|
||||||
response.render(CssHeaderItem.forUrl("wro/lib.css"));
|
response.render(CssHeaderItem.forUrl("wro/lib.css"));
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ import java.util.Map;
|
|||||||
import ro.isdc.wro.manager.factory.ConfigurableWroManagerFactory;
|
import ro.isdc.wro.manager.factory.ConfigurableWroManagerFactory;
|
||||||
import ro.isdc.wro.model.resource.processor.ResourcePreProcessor;
|
import ro.isdc.wro.model.resource.processor.ResourcePreProcessor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Runtime solution
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class WroManagerFactory extends ConfigurableWroManagerFactory {
|
public class WroManagerFactory extends ConfigurableWroManagerFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.commafeed.frontend.resources;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import ro.isdc.wro.model.resource.processor.ResourcePostProcessor;
|
||||||
|
import ro.isdc.wro.model.resource.processor.ResourcePreProcessor;
|
||||||
|
import ro.isdc.wro.model.resource.processor.support.ProcessorProvider;
|
||||||
|
|
||||||
|
import com.google.api.client.util.Maps;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build-time solution
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class WroSassProvider implements ProcessorProvider {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, ResourcePreProcessor> providePreProcessors() {
|
||||||
|
Map<String, ResourcePreProcessor> map = Maps.newHashMap();
|
||||||
|
map.put("sassOnlyProcessor", new SassOnlyProcessor());
|
||||||
|
map.put("sassImport", new SassImportProcessor());
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, ResourcePostProcessor> providePostProcessors() {
|
||||||
|
return Maps.newHashMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
com.commafeed.frontend.resources.WroSassProvider
|
||||||
Reference in New Issue
Block a user