Code Monkey home page Code Monkey logo

granule's People

Watchers

 avatar

granule's Issues

Add OSGi support

Add OSGi support

Original issue reported on code.google.com by hall.dennis on 14 Jul 2011 at 1:40

Question on Caching

Does Granule compile and minify the same set of JS files for each request or is 
it somehow cached?

Original issue reported on code.google.com by [email protected] on 20 Sep 2013 at 9:20

Creting multiple cache files.

What steps will reproduce the problem?
1. Deploy .war folder to jboss-5.1.0.GA
2. Run Jboss.
3. After every new hit new cache file is creating. Because of this Jboss will 
crashed with the error "Out of memory."

What is the expected output? What do you see instead?
-> only single cache file should create, and granule should check if already 
exists then then it should pick the already existing file.

What version of the product are you using? On what operating system?
-> granule1.0.7



Original issue reported on code.google.com by [email protected] on 8 May 2011 at 10:06

Attachments:

Can be setup to preserve license headers of JS libraries? No documentation.

What steps will reproduce the problem?
1.Add copyright info to JS Files
2.Turn compression on.

What is the expected output? What do you see instead?
A way to keep license information intact.

Please provide any additional information below.
I cannot find a way to do this? Pleas help. I am having issues only with 
myFaces.

Original issue reported on code.google.com by [email protected] on 21 Oct 2013 at 5:04

Corrupted JS - problems with comments vs regex //

What steps will reproduce the problem?
1. compact a JS library, e.g. jQuery mobile: 
http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js
This is the same like issue #12
2. granule removes all comments with //
3. // is also used for regular expressions, so they are also removed

What is the expected output? What do you see instead?

Expected: return/\//.test(a)},clean:function(a)
Instead stripped: return/\...

What version of the product are you using? On what operating system?
1.0.9


Original issue reported on code.google.com by [email protected] on 8 Jun 2012 at 9:53

Granule not working with jquery mobile

What steps will reproduce the problem?
1. includes jquery.mobile-1.0a4.1.min.css and jquery.mobile-1.0a4.1.min.js
2.
3.

What is the expected output? What do you see instead?
Page becomes unformatted

What version of the product are you using? On what operating system?
1.0.9

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 21 Jul 2011 at 9:47

Granule is not maven

What steps will reproduce the problem?
1. visit http://search.maven.org/
2. search for granule
3. no results found

What is the expected output? What do you see instead?
I should be able to see granule

What version of the product are you using? On what operating system?
This covers all versions

Please provide any additional information below.
I want to help, how can I help?

Original issue reported on code.google.com by [email protected] on 29 Jun 2012 at 2:25

Encountered StackOverflow error if CSS has Base64 encoded images.

What steps will reproduce the problem?
1. Add a css definition with 'background' which has base64 encoded image. 
   Ex.
.loading 
{   background:url("data:image/gif;base64,R0lGODlhIAAgAOZsAN3d3fX19fr6+unp6a2trays
rICAgNra2vHx8d/f3/Ly8vn5+evr6+Tk5OPj4/7+/uDg4Obm5uXl5fDw8Pv7+/z8/O/v7/Pz88jIyO3t
7cvLy+7u7rS0tKCgoK+vr97e3sTExNjY2PT09LOzs+jo6MHBwdDQ0Kurq83Nzfb29qOjo7e3t5qamru7
u8LCwv39/Z6entTU1NLS0ry8vM/Pz4uLi9HR0ZiYmMrKyrq6uufn5+rq6q6urs7OzsbGxtbW1r29vaen
p9fX15SUlNXV1bGxsbKyssDAwNzc3NPT052dnfj4+ISEhOzs7I+Pj9vb24mJib6+vsnJybm5uYKCgpeX
l6Ghoff396ampuHh4aSkpKKiori4uKqqqoGBgampqZOTk+Li4sXFxaioqMzMzL+/v7a2tpmZmZaWlsPD
w9nZ2f///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/
IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6
bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8x
Mi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9y
Zy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZ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fmyxGSQwCgi8iJEQgoWwh
kQkzHZ2roxgHG4MfHqmeoK2hMhlsXdCq0tPBg0EqPQiWbEsSGt1sgQAh+QQFAABsACwFAAAAFgAJAEAH
aIBsgoIISBpRHGxaHEA4TwiDkYI7kpWCH4M+BJucnGwqBaGiooIKNCOdm2xbo6EjNAqDU5seIB8TFYIU
FgBpHqGVOhocnaujHBoRgxElqZ6graFHEmw5zqrQ0ZJcKwcBlmwiaitsQoKBACH5BAUAAGwALAUAAAAW
AAkAQAdjgGyCggERByYYbGgdJy02GYORghaSlZVJaZmammxDaJ+goIIpABibmZ2hnzAlG4NSmSBEJCIv
ggIMSUYsn5UbB6acnqAdMwmDGTKnwqqgHh9ssMtpqc1okhgaEkuWbAg9KpGBADs=") center 
center no-repeat;
}
2. Run application with Granule enabled.

What is the expected output? 
Compressed unified CSS file.

What do you see instead?
Encountered a StackOverflow error. CSS files are not rendered. 

What version of the product are you using? On what operating system?
1.0.9

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 26 Oct 2013 at 10:11

JSF 2.0 facelet support

JSF 2.0 facelets are currently not supported.

To workaround this, the are the five steps to execute for JSF 2.0.


1). Add new component to faces-config.xml:

<component>
    <component-type>package.CompressComponent</component-type>
    <component-class>package.component.CompressComponent</component-class>
</component>


2). Create new taglib file named "granule.taglib.xml" and save it to WEB-INF:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE facelet-taglib PUBLIC
        "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
        "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
<facelet-taglib>
    <namespace>http://package/granule</namespace>
    <tag>
        <tag-name>compress</tag-name>
        <component>
            <component-type>package.CompressComponent</component-type>
        </component>
    </tag>
</facelet-taglib>


3). Add reference to new taglig in web.xml:

<context-param>
    <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
    <param-value>/WEB-INF/granule.taglib.xml</param-value>
</context-param>


4). Create new Java class for CompressComponent:

import java.io.IOException;
import java.io.StringWriter;
import java.util.Map;
import javax.faces.component.UIComponent;
import javax.faces.component.UIOutput;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.servlet.http.HttpServletRequest;
import com.granule.CompressTagHandler;
import com.granule.JSCompileException;
import com.granule.RealRequestProxy;


/**
 * JSF 2.0 Granule compress component.
 */
public class CompressComponent extends UIOutput {

    @Override
    public void encodeBegin(FacesContext context) throws IOException {

        // Pass through attributes.
        Map<String, Object> attributes = getAttributes();
        String method = (String) attributes.get("method");
        String options = (String) attributes.get("options");
        String basepath = (String) attributes.get("basepath");
        String enabledString = (String) attributes.get("enabled");
        boolean enabled = enabledString == null || Boolean.parseBoolean(enabledString);

        try {
            String oldTagBody = renderTagBody(context);
            String newTagBody;
            if (enabled) {
                HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest();
                RealRequestProxy runtimeRequest = new RealRequestProxy(request);
                CompressTagHandler compressor = new CompressTagHandler(getId(), method, options, basepath);
                newTagBody = compressor.handleTag(runtimeRequest, runtimeRequest, oldTagBody);
            } else {
                newTagBody = oldTagBody;
            }
            context.getResponseWriter().write(newTagBody);

        } catch (JSCompileException e) {
            throw new IOException(e);
        }
    }

    /**
     * Render children.
     *
     * @param context FacesContext
     * @return Tag body (children) as String
     * @throws IOException on write error
     */
    private String renderTagBody(FacesContext context) throws IOException {

        ResponseWriter originalResponseWriter = context.getResponseWriter();
        StringWriter tmpStringWriter = new StringWriter();
        String oldTagBody = "";

        try {
            context.setResponseWriter(originalResponseWriter.cloneWithWriter(tmpStringWriter));
            for (UIComponent comp : getChildren()) {
                comp.encodeAll(context);
            }
            oldTagBody = tmpStringWriter.toString();

        } finally {
            context.setResponseWriter(originalResponseWriter);
        }
        return oldTagBody;
    }

    @Override
    public void encodeEnd(FacesContext context) throws IOException {
        // NOP
    }

    @Override
    public boolean getRendersChildren() {
        return true;
    }
}


5). Add granule namespace to xhtml facelet end use new tag:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
           xmlns:ui="http://java.sun.com/jsf/facelets"
           xmlns:h="http://java.sun.com/jsf/html"
           xmlns:granule="http://nl.agisweb/granule">

    <granule:compress>
        <link type="text/css" rel="stylesheet" href="#{request.contextPath}/resources/css/style1.css/>
        <link type="text/css" rel="stylesheet" href="#{request.contextPath}/resources/css/style2.css/>
        <link type="text/css" rel="stylesheet" href="#{request.contextPath}/resources/css/style3.css/>
    </granule:compress>
</html>

Original issue reported on code.google.com by [email protected] on 10 Jul 2011 at 9:15

File size not getting reduced

What steps will reproduce the problem?
1.Enable <g:compress>
2.open view source
3.verify for combined.js, .class file size

What is the expected output? What do you see instead?
I am getting combined.js in view source, but the .class file size for the jsp 
is still the same

What version of the product are you using? On what operating system?
I am using weblogic server 10.0.2. Operating system is linux.

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 15 Oct 2012 at 2:58

"jsessionid" attribute added to CSS and JS links

Hi Jonathan,

When evaluating Granule 1.0.9 we have faced an issue on Tomcat 6.0.33
when CSS and JS links passed to Granule in some test cases where extended 
with "jsessionid" attribute by servlet container.
We beleive it happens in scope of some URL rewriting for session tracking,
like it was discussed in Tomcat forum some time ago:

http://mail-archives.apache.org/mod_mbox/tomcat-users/200407.mbox/%3C4106C206.20
[email protected]%3E

Due to this fact CSS and JS links are coming into CompressTagHandler looking 
like this, for example:

/peoplebook-web/js/ext-js/resources/css/ext-all.css;jsessionid=63DF136D17F40FA53
0A76083932A05E6

causing Granule to throw an exception like this:

com.granule.JSCompileException: Dynamic or remote stylesheets can not be 
combined. 
href=/peoplebook-web/js/ext-js/resources/css/ext-all.css;jsessionid=63DF136D17F4
0FA530A76083932A05E6
com.granule.CompressTagHandler.processChunk(CompressTagHandler.java:284)
com.granule.CompressTagHandler.handleTag(CompressTagHandler.java:198)
com.granule.CompressTag.doAfterBody(CompressTag.java:66)

Let me suggest a patch to file  
tag-main/src/com/granule/CompressTagHandler.java 
which is fixing the problem (attached below).
Files in attachment:

CompressTagHandler.diff  - change in DIFF format
CompressTagHandler.java  - changed file
CompressTagHandler.diff.htm  - change report generated by WinMerge program

Could you please let me know what do you think about this change?

Best regards,
Egor Abramovich

Original issue reported on code.google.com by [email protected] on 2 Sep 2011 at 2:27

Attachments:

Non-exploded deployment leads to NPE

What steps will reproduce the problem?

1. Deploy jsp-demo-1.0.9.war in Tomcat 7.0.x (verified in 7.0.39) using a 
context descriptor jsp-demo.xml:
<Context docBase="C:\temp\jsp-demo-1.0.9.war">  
</Context>
2. Place the context descriptor in <tomcat>\conf\Catalina\localhost
3. Start Tomcat
Tomcat will now deploy the application in non-exploded.
4. Open http://localhost:8080/jsp-demo. Click on the first Hello World link.

What is the expected output? What do you see instead?
Expected to show the hello world output.
Seeing a stack trace:
org.apache.jasper.JasperException: javax.servlet.ServletException: 
javax.servlet.jsp.JspTagException: java.lang.NullPointerException
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:585)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
root cause

javax.servlet.ServletException: javax.servlet.jsp.JspTagException: 
java.lang.NullPointerException
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:908)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:841)
    org.apache.jsp.samples.hello_002dclosure_jsp._jspService(hello_002dclosure_jsp.java:92)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
root cause

java.lang.NullPointerException
    java.io.File.<init>(File.java:222)
    com.granule.CompressTagHandler.processChunk(CompressTagHandler.java:289)
    com.granule.CompressTagHandler.handleTag(CompressTagHandler.java:198)
    com.granule.CompressTag.doAfterBody(CompressTag.java:66)
    org.apache.jsp.samples.hello_002dclosure_jsp._jspx_meth_g_005fcompress_005f0(hello_002dclosure_jsp.java:119)
    org.apache.jsp.samples.hello_002dclosure_jsp._jspService(hello_002dclosure_jsp.java:73)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)


What version of the product are you using? On what operating system?
1.0.9, Windows 7, Tomcat 7.0.39

Please provide any additional information below.
The problem is that the code relies on 
request.getSession().getServletContext().getRealPath(path);
to get a file handle to each file.
But in a non-exploded deployment, getRealPath(..) will always return null.
Discussion about this behaviour here:
http://stackoverflow.com/questions/536228/why-does-getrealpath-return-null-when-
deployed-with-a-war-file




Original issue reported on code.google.com by [email protected] on 23 Apr 2013 at 6:45

css file belong to same group is not taken from cache

What steps will reproduce the problem?
1. split the css file in 2 group i.e common in 2 different page
2. put g:compress tag between 2 groups
3. run the app

What is the expected output? What do you see instead?
The same group file should be taken from cache.

What version of the product are you using? On what operating system?
1.0.9

Please provide any additional information below.
let us take an example.
We have 2 jsp file. File1.jsp and File2.jsp
File1.jsp
<g:compress>
<a.css>
<b.css>
</g:compress>
<g:compress>
<c.css>
<d.css>
</g:compress>

File2.jsp
<g:compress>
<a.css>
<b.css>
</g:compress>
<g:compress>
<e.css>
<f.css>
</g:compress>

so we have created 2 g:compress tag in File1 and File2.

if we load the File2.jsp after File1.jsp the combine?XXXX.css should be taken 
from the cache, but its loading again from the server.


Original issue reported on code.google.com by [email protected] on 9 Apr 2014 at 7:00

Few question about granule.properties and Ant task

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
1.0.9

Please provide any additional information below.
Q1 - Is the Ant task compile all the JSP under war or it reads all the files 
under war but compile only those which has granule tag in it.

Q2- Next time if use this task , will it compile only changed JSP's or all JSP's

Q3- If I make any changes to granule.properties file do I need build and war 
again or copy that file on server will work.

Q4- what these will do?closure-compiler.formatting.pretty_print and 
closure-compiler.formatting.print_input_delimiter 

Thanks!

Original issue reported on code.google.com by [email protected] on 20 May 2011 at 6:59

relative url's for image in CSS is changed

What steps will reproduce the problem?
1.create css class in any css file with background image in it with relative url
2.use granule tag to combine with cssfastmin method 
3.in combine.css the relative url is changed style/..

What is the expected output? What do you see instead?
relative url in css class does not change

What version of the product are you using? On what operating system?
1.0.7

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 9 May 2011 at 6:47

How to turned of log messages

What steps will reproduce the problem?
1.Console has messages like below
2.INFO: removeUnusedVars
May 20, 2011 3:29:19 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: deadAssignmentsElimination
May 20, 2011 3:29:21 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: inlineVariables
May 20, 2011 3:29:22 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: inlineFunctions
May 20, 2011 3:29:23 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: minimizeExitPoints
May 20, 2011 3:29:23 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: peepholeOptimizations
May 20, 2011 3:29:24 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: removeUnreachableCode
May 20, 2011 3:29:26 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: removeUnusedVars
May 20, 2011 3:29:26 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: deadAssignmentsElimination
May 20, 2011 3:29:29 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: inlineVariables
May 20, 2011 3:29:30 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: inlineFunctions
May 20, 2011 3:29:30 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: minimizeExitPoints
May 20, 2011 3:29:30 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: beforeModuleMotion
May 20, 2011 3:29:30 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: afterModuleMotion
May 20, 2011 3:29:30 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: flowSensitiveInlineVariables
May 20, 2011 3:29:43 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: removeUnusedVars
May 20, 2011 3:29:44 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: convertToDottedProperties
May 20, 2011 3:29:44 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: markUnnormalized
May 20, 2011 3:29:44 PM com.google.javascript.jscomp.PhaseOptimizer$NamedPass 
process
INFO: coalesceVariableNames

3.How to turned them off 

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 21 May 2011 at 12:01

unexpected token function (a JavaScript error when using granule:compress)

What steps will reproduce the problem?
1.follow issue 10 
2.use it in .xhtml file

What is the expected output? What do you see instead?
should display the same output as without using granule:compress tag.

What version of the product are you using? On what operating system?
1.0.9

Please provide any additional information below.

I followed Issue 10 steps for JSF 2.0. But when i try to run my application it 
gives "unexpected token function" in chrome. i searched for it and found it is 
a js error so i think my <granule:compress> tag is not compressing/removing 
spaces in my javascript files correctly. so kindly help me in resolving the 
issue. Without using granule:compress tag for js files my application is 
running fine.

Original issue reported on code.google.com by [email protected] on 22 Oct 2012 at 10:31

remote css and JS can not be combine

What steps will reproduce the problem?
1.In my project I have css and JS coming from different path then web-app e.g 
JS is called like this 
<script src="http://mydomain.com/script/test.js"/>
<script src="/web-app/script/test.js"/>
2.
3.

What is the expected output? What do you see instead?
can above two JS be combined

What version of the product are you using? On what operating system?
1.0.9

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 10 May 2011 at 3:48

unable check ressources

What steps will reproduce the problem?
Granule always checks that the ressource JS or CSS has been not modified.
This operation costs in terms of I/O.

What is the expected output? What do you see instead?
Make configurable the activation of ressources verification.

What version of the product are you using? On what operating system?
version 1.0.9, Linux OS

Original issue reported on code.google.com by [email protected] on 17 Dec 2014 at 3:01

g:compress produces a <script> tag without <type>

What steps will reproduce the problem?
1. g:compress produces a <script> tag without type="text/javascript"
2.
3.

What is the expected output? What do you see instead?

<script type="text/javascript" src="/combined.js?"

What version of the product are you using? On what operating system?

1.0.9

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 27 Jun 2011 at 8:01

Client side loaded combined.css empty

What steps will reproduce the problem?
1. Sporadic

What is the expected output? What do you see instead?
Combined css


What version of the product are you using? On what operating system?
1.0.9

Please provide any additional information below.
Sometimes (and I mean sometimes, as in once every 5 thousand loads?) a 
combined.css file loaded from the server returns as empty. When I've caught it 
the network response code is 200 ok. There's no internal server error, nothing 
gets logged in the console. 

I first used FileCache method, for which it occurred a bit more regularly and 
the switching over to MemoryCache method and after a couple weeks of not 
getting this problem I thought it was resolved, but today a colleague of mine 
got the exact same issue again. I've tried finding the root cause, but because 
of the non reproducibility of the issue I'm unable to trace the cause and with 
no log output or any visible error of any kind I'm at a loss.

I'm sorry for logging a bug of this type. I know it's the most frustrating 
type, but I was wondering whether anybody can help in any way whatsoever as I'm 
dumbstruck.

Please ask for any additional information required as I'm not sure what's 
required.

Original issue reported on code.google.com by [email protected] on 27 Aug 2013 at 9:18

Minor bug with URL rewriting in CSS

I have a some CSS that looks like this:

@font-face {
    font-family: 'AdelleBasicBold';
    src: url('/stylesheets/adellebasic_bold-adelle.eot');
}

Note that the url begins with a slash and so should be considered relative to 
the app root (not the location of the css file which is /stylesheets).

The generated url should remain unchanged in this situation, however the 
generated css looks like this:

@font-face {
    font-family: 'AdelleBasicBold';
    src: url(stylesheets/stylesheets/adellebasic_bold-adelle.eot);
}


What version of the product are you using? On what operating system?
    1.0.9, on win xp, with google app engine version 1.6.0

Please provide any additional information below.
    I have a work-around so I don't need a fix, I just wanted to help you out. This project is awesome! Keep up the good work and thanks for writing it!

Original issue reported on code.google.com by [email protected] on 9 Nov 2011 at 2:34

granule does not work in a multi app-server environment

Granule was implemented in our environment, which has a lot of app servers.  
Users and their session data are migrated between servers for various reasons.  
When a user is migrated to a different app server the granule id in their 
browser cache is no longer invalid, because granule ids are based on a 
combination of a name hash and that server's system time.

Is it possible to have granule generate ids that are consistent across multiple 
app servers?  Would it be possible to remove the timestamp component of the 
generated ids?


Original issue reported on code.google.com by [email protected] on 9 Aug 2011 at 11:28

For me its not working

What steps will reproduce the problem?
1.get the jar and kept in my lib
2.in my jsp added taglib directive
3.used g:compress

What is the expected output? What do you see instead?
not getting combine.js

What version of the product are you using? On what operating system?
1.0.9

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 26 Sep 2011 at 11:11

Cache file location

I am deploying an enterprise application, and for ease of operation staff, I 
need to put the granulecache in the work directory of my service. I want to 
know whether I can set it with property "cache.file.location= " in a relative 
path like "CATALINA_BASE"?
I know it supports explicit path like D:/service/work/... but can i have 
relative path?


I am using version 1.0.11-SNAPSHOT granule on windows




Original issue reported on code.google.com by [email protected] on 23 Jun 2014 at 4:23

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.