Package org.mycore.sass
Class MCRSassCompilerManager
java.lang.Object
org.mycore.sass.MCRSassCompilerManager
Compiles .scss to .css or .min.css using different sources (
Importer
s)- Author:
- Sebastian Hofmann (mcrshofm)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCSSFile
(String file, List<io.bit3.jsass.importer.Importer> importer) Gets the compiled(&compressed) CSSstatic MCRSassCompilerManager
getLastCompiled
(String name) getLastMD5
(String name) boolean
-
Constructor Details
-
MCRSassCompilerManager
public MCRSassCompilerManager()
-
-
Method Details
-
getInstance
-
getCSSFile
public Optional<String> getCSSFile(String file, List<io.bit3.jsass.importer.Importer> importer) throws io.bit3.jsass.CompilationException, IOException Gets the compiled(&compressed) CSS- Parameters:
file
- the path to a .scss file. File should end with .css or .min.css (The compiler will look for the .scss file, then compiles and decides to minify or not).importer
- a additional list of importers- Returns:
- Optional with the compiled css as string. Empty optional if the fileName is not valid.
- Throws:
io.bit3.jsass.CompilationException
- ifCompiler.compile(FileContext)
throwsIOException
-
getLastCompiled
- Parameters:
name
- the name of file- Returns:
- the time when the specific file was compiled last time.
-
getLastMD5
- Parameters:
name
- the name of file- Returns:
- the md5 hash of the last compiled specific file.
-
isDeveloperMode
public boolean isDeveloperMode()
-