CompileLess Class
Compiles Less CSS files to CSS stylesheets.
Namespace
Statiq.Less
Interfaces
Base Types
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(IExecutionContext, ExecutionOutputs) void
Called after each module execution.
Inherited from Module
AfterExecutionAsync(IExecutionContext, ExecutionOutputs) Task
Called after each module execution.
Inherited from Module
BeforeExecution(IExecutionContext) void
Called before each module execution.
Inherited from Module
BeforeExecutionAsync(IExecutionContext) Task
Called before each module execution.
Inherited from Module
ExecuteAsync(IExecutionContext) Task<IEnumerable<IDocument>>
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(IExecutionContext) Task<IEnumerable<IDocument>>
Executes the module once for all input documents.
ExecuteInputAsync(IDocument, IExecutionContext) Task<IEnumerable<IDocument>>
Executes the module.
Inherited from Module
Finally(IExecutionContext) void
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
FinallyAsync(IExecutionContext) Task
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
WithInputPath(Config<NormalizedPath>) 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.

Extension Methods