Skip to content

nfriedly/eleventy-plugin-less

Repository files navigation

eleventy-plugin-less

Plugin for Eleventy (11ty) to compile Less stylesheets to CSS.

Currently compiles every .less file in your project into a distinct output .ccs file. You can use eleventy ignores to disable compilation of library, utility, etc. files.

Automatically appends inline sourcemaps to the end of files.

Usage

In your .eleventy.js config file:

const pluginLess = require("eleventy-plugin-less");

module.exports = function (eleventyConfig) {
	eleventyConfig.addPlugin(pluginLess);
    // ...
};

There are currently no configuration options.

Todo

  • Tests
  • Add a way to specify entrypoint files and ignore all others
  • Add a way to control sourcemaps
  • Allow options to be passed directly to less