public class Less
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMPRESS
Key for compress option. true, if the CSS data should be compressed without any extra formating characters.
|
static java.lang.String |
REWRITE_URLS
Rewrites URLs to make them relative to the base less file.
|
| Constructor and Description |
|---|
Less() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
compile(java.io.File lessFile,
boolean compress)
Compile the less data from a file.
|
static java.lang.String |
compile(java.io.File lessFile,
boolean compress,
ReaderFactory readerFactory)
Compile the less data from a file.
|
static java.lang.String |
compile(java.net.URL baseURL,
java.lang.String lessData,
boolean compress)
Compile the less data from a string.
|
static java.lang.String |
compile(java.net.URL baseURL,
java.lang.String lessData,
boolean compress,
ReaderFactory readerFactory)
Compile the less data from a string.
|
static java.lang.String |
compile(java.net.URL baseURL,
java.lang.String lessData,
java.util.Map<java.lang.String,java.lang.String> options)
Compile the less data from a string.
|
static java.lang.String |
compile(java.net.URL baseURL,
java.lang.String lessData,
java.util.Map<java.lang.String,java.lang.String> options,
ReaderFactory readerFactory)
Compile the less data from a string.
|
public static final java.lang.String COMPRESS
public static final java.lang.String REWRITE_URLS
public static java.lang.String compile(java.net.URL baseURL,
java.lang.String lessData,
boolean compress)
throws LessException
baseURL - the baseURL for import of external less data.lessData - the input less datacompress - true, if the CSS data should be compressed without any extra formating characters.LessException - if any error occur on compiling.public static java.lang.String compile(java.net.URL baseURL,
java.lang.String lessData,
boolean compress,
ReaderFactory readerFactory)
throws LessException
baseURL - the baseURL for import of external less data.lessData - the input less datacompress - true, if the CSS data should be compressed without any extra formating characters.readerFactory - A factory for the readers for imports.LessException - if any error occur on compiling.public static java.lang.String compile(java.net.URL baseURL,
java.lang.String lessData,
java.util.Map<java.lang.String,java.lang.String> options)
throws LessException
baseURL - the baseURL for import of external less data.lessData - the input less dataoptions - some optional options, see constants for detailsLessException - if any error occur on compiling.public static java.lang.String compile(java.net.URL baseURL,
java.lang.String lessData,
java.util.Map<java.lang.String,java.lang.String> options,
ReaderFactory readerFactory)
throws LessException
baseURL - the baseURL for import of external less data.lessData - the input less dataoptions - some optional options, see constants for detailsreaderFactory - A factory for the readers for imports.LessException - if any error occur on compiling.public static java.lang.String compile(java.io.File lessFile,
boolean compress)
throws java.io.IOException
lessFile - the less filecompress - true, if the CSS data should be compressed without any extra formating characters.java.io.IOException - if an I/O error occurs reading from the less filepublic static java.lang.String compile(java.io.File lessFile,
boolean compress,
ReaderFactory readerFactory)
throws java.io.IOException
lessFile - the less filecompress - true, if the CSS data should be compressed without any extra formating characters.readerFactory - A factory for the readers for imports.java.io.IOException - if an I/O error occurs reading from the less file