Compiles Less CSS files to CSS stylesheets.
- Namespace
- Statiq
.Less - Interfaces
- Base Types
-
- object
- Module
graph BT
Type-->Base0["Module"]
click Base0 "/api/Statiq.Common/Module"
Base0-->Base1["object"]
Type-.->Interface0["IModule"]
click Interface0 "/api/Statiq.Common/IModule"
Type["CompileLess"]
class Type type-node
Syntax
public class CompileLess : Module, IModule
Examples
This is a pipeline that compiles two Less CSS files, one for Bootstrap (which contains a lot of includes) and a second for custom CSS.
Pipelines.Add("Less",
ReadFiles("master.less"),
Concat(ReadFiles("bootstrap.less")),
Less(),
WriteFiles(".css")
);
Remarks
The content of the input document is compiled to CSS and the content of the output document contains the compiled CSS stylesheet.
Methods
Name | Return Value | Summary |
---|---|---|
AfterExecution |
void |
Called after each module execution.
Inherited from Module
|
AfterExecutionAsync |
Task |
Called after each module execution.
Inherited from Module
|
BeforeExecution |
void |
Called before each module execution.
Inherited from Module
|
BeforeExecutionAsync |
Task |
Called before each module execution.
Inherited from Module
|
ExecuteAsync |
Task |
This should not be called directly, instead call
IExecutionContext.Execute() if you need to execute a module from within another module.
Inherited from Module
|
ExecuteContextAsync |
Task |
Executes the module once for all input documents.
|
ExecuteInputAsync |
Task |
Executes the module.
Inherited from Module
|
Finally |
void |
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
|
FinallyAsync |
Task |
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
|
WithInputPath |
CompileLess |
Specifies a delegate that should be used to get the input path for each
input document. This allows the Sass processor to search the right
file system and paths for include files. By default, the value of
Source is used for the input document path.
|