-
Notifications
You must be signed in to change notification settings - Fork 203
Plugins
Dotless has a plugin mechanism which allows dotless to be extended.
List all the plugins by using the -l command line switch. This will tell you all the plugins installed.
Install a plugin dll by creating a directory in the same folder as the compiler called "plugins" and putting the dll in their. It should now appear in the list of plugins available.
To run a plugin, use the -p parameter. The format is -p:PluginName[:Parameter1=Argument1[,Parameter1=Argument2]]
e.g.
dotless.Compiler.exe -p:Rtl:forceRtlTransform=true,onlyReversePrefixedRules=true
The dotless config section can be expanded to include the plugins, e.g.
<dotless minifyCss="true" cache="false" handleWebCompression="true">
<plugin name="Rtl">
<pluginParameter name="onlyReversePrefixedRules" value="false" />
<pluginParameter name="forceRtlTransform" value="false" />
</plugin>
</dotless>
The plugin node takes an additional attribute "assembly" which can specify the name of the assembly to load the plugin from, if it is not one of the bundled dotless plugins.
Dotless has some plugins included.
- RTL plugin - for developing stylesheets that work in both LTR and RTL languages
- ColorSpin Plugin - example plugin that spins all the colours in a stylesheet
Function Plugins - Add functions
Visitor Plugins - Alter the less Abstract Syntax Tree
Plugin Configuration - How to add plugin configuration