|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.theme.preprocessor.LessThemePreProcessor
public class LessThemePreProcessor
Pre processor that picks up Less files in the theme directory and compiles to CSS
Less files are compiled using the Apache lesscss compiler
LessCompiler
Constructor Summary | |
---|---|
LessThemePreProcessor()
|
Method Summary | |
---|---|
protected List<String> |
getLessFileNamesForTheme(String themeName,
File themeDirectory,
Properties themeProperties,
File stylesheetsDirectory)
Builds the list of Less files names that should be processed for the given theme |
void |
processTheme(String themeName,
File themeDirectory,
Properties themeProperties)
Processes Less files that should be included for the given theme |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LessThemePreProcessor()
Method Detail |
---|
public void processTheme(String themeName, File themeDirectory, Properties themeProperties)
The list of Less files for the theme is collected by a helper method then iterated over and compiled using the less compiler. The list of Less files that were processed is written as a property in the theme properties for direct Less support in development mode
processTheme
in interface ThemePreProcessor
themeName
- name of the theme to processthemeDirectory
- directory containing the theme assetsthemeProperties
- properties for the theme containing its configurationgetLessFileNamesForTheme(java.lang.String, java.io.File, java.util.Properties, java.io.File)
protected List<String> getLessFileNamesForTheme(String themeName, File themeDirectory, Properties themeProperties, File stylesheetsDirectory)
All files with the .less
extension that are in the theme's stylesheets
directory are picked up as part of the theme (this includes files that are overlaid from a parent).
All subdirectories of stylesheets are also picked up, with the exception of the include
subdirectory. Other exclusions can be configured using the lessExcludes
property in the
theme's properties file
themeName
- name of the theme to pull less files forthemeDirectory
- directory containing the theme's assetsthemeProperties
- config properties for the themestylesheetsDirectory
- theme directory which contains the stylesheets, less files will be
picked up here
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |