skewer-less

https://github.com/purcell/skewer-less.git

git clone 'git://github.com/purcell/skewer-less.git'
2

Melpa Status Melpa Stable Status

skewer-less.el

Emacs minor mode allowing LESS stylesheet manipulation via skewer-mode.

Note that this is intended for use in place of skewer-css-mode, which does not work with LESS.

Operates by invoking less.refresh() via skewer on demand, or whenever the buffer is saved.

For this to work properly, the less javascript should be included in the target web page, and less should be configured in development mode, e.g.

<script>
  var less = {env: "development"};
</script>
<link href="/stylesheets/application.less" rel="stylesheet/less">
<script src="/path/to/less.js" type="text/javascript"></script>

I may consider providing an option to instead run lessc from Emacs, then send the output via skewer-css. Let me know if you want this.

Installation

If you choose not to use one of the convenient packages in Melpa and Marmalade, you'll need to add the directory containing skewer-less.el to your load-path, and then (require 'skewer-less).

Usage

Enable skewer-less in an individual buffer like this:

(skewer-less-mode)

Save the buffer to trigger an update, or hit C-c C-k just like in skewer-css-mode.


Steve Purcell's blog // @sanityinc on Twitter