Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove LESS support #81

Open
wants to merge 1 commit into
base: openrefine
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>com.metaweb</groupId>
<artifactId>lessen</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down
32 changes: 0 additions & 32 deletions main/src/edu/mit/simile/butterfly/ButterflyModuleImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.metaweb.lessen.Utilities;
import com.metaweb.lessen.tokenizers.CondensingTokenizer;
import com.metaweb.lessen.tokenizers.IndentingTokenizer;
import com.metaweb.lessen.tokenizers.Tokenizer;


/**
* This class is the base implementation of ButterflyModule and
Expand Down Expand Up @@ -447,10 +442,6 @@ public boolean process(String path, HttpServletRequest request, HttpServletRespo
return sendText(request, response, path, encoding, "text/css",false);
}

if (path.endsWith(".less")) {
return sendLessen(request, response, path, encoding, "text/css",false);
}

if (path.endsWith(".html")) {
return sendText(request, response, path, encoding, "text/html",false);
}
Expand Down Expand Up @@ -523,29 +514,6 @@ public boolean sendTextFromTemplate(HttpServletRequest request, HttpServletRespo
_logger.trace("< template {} [{}|{}]", new String[] { template, encoding, mimeType });
return true;
}

public boolean sendLessen(HttpServletRequest request, HttpServletResponse response, String path, String encoding, String mimeType, boolean absolute) throws Exception {
URL url = getResource(path);

Map<String, String> variables = new HashMap<String, String>();
variables.put("module", _name);

Tokenizer tokenizer = Utilities.openLess(url, variables);
tokenizer = new CondensingTokenizer(tokenizer, false);
tokenizer = new IndentingTokenizer(tokenizer);

return sendLessenTokenStream(request, response, tokenizer, encoding, "text/css",false);
}

public boolean sendLessenTokenStream(HttpServletRequest request, HttpServletResponse response, Tokenizer tokenizer, String encoding, String mimeType, boolean absolute) throws Exception {
try {
response.setContentType(mimeType);
Utilities.write(tokenizer, getFilteringWriter(request, response, absolute));
} catch (ResourceNotFoundException e) {
response.sendError(HttpServletResponse.SC_NOT_FOUND);
}
return true;
}

public boolean sendString(HttpServletRequest request, HttpServletResponse response, String str, String encoding, String mimeType) throws Exception {
_logger.trace("> string: '{}'", str);
Expand Down
3 changes: 0 additions & 3 deletions modules.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ examples.skin = modern
extended-examples = /examples/
extended-examples.skin = modern

less-examples = /less/
less-examples.skin = modern

modern = /skin/

jquery = /lib/jquery/
Expand Down
5 changes: 0 additions & 5 deletions modules/samples/examples/index.vt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@
<ul>
<li><a href="simple">Simple Templating</a></li>
</ul>

<ul>
<li><a href="../less/">LESS Example</a></li>
</ul>

5 changes: 0 additions & 5 deletions modules/samples/less-examples/MOD-INF/module.properties

This file was deleted.

37 changes: 0 additions & 37 deletions modules/samples/less-examples/index.html

This file was deleted.

16 changes: 0 additions & 16 deletions modules/samples/less-examples/styles/common.less

This file was deleted.

12 changes: 0 additions & 12 deletions modules/samples/less-examples/styles/panels/panel-one/panel.less

This file was deleted.

12 changes: 0 additions & 12 deletions modules/samples/less-examples/styles/panels/panel-two/panel.less

This file was deleted.

17 changes: 0 additions & 17 deletions modules/samples/less-examples/styles/panels/panels.less

This file was deleted.