Hi,
i just created plugin for compiling LESS files on save.
Features:
- no file watchers required
- no overhead (plugin only runs on *.less files, so there is no slowdown while saving other files)
- options dialog - for setting path to your LESS compiler, minification and source maps
Requirements:
- LESS installed somewhere in your computer (only works with version >2.0)
Notes:
- plugin assumes, you are working with directories /less/ and /css/ (eg. /project/less/ contains your *.less files and /project/css/ will contain compiled css files)
- if the *.less file is included in other (main) *.less file, add comment like this in included file "//@main main.less" (without the quotes) - where main.less is the name of your main file.
- this is because when you save your included file, the main file should be compiled instead.
- this plugin will not work, if you use subdirectories for your *.less files (eg. /project/less/includes/*.less).
- after installation set your LESS path in plugin options (Plugins > Save LESS > Options). Add double quotes if it contains spaces or other special characters (my path looks like "d:\Software\nodejs\lessc.cmd" - including quotes).
- if you have better idea for compiling main files without the special comment in included files, please let me know here.
I can offer (limited) support for this plugin, here in this forum thread.
I will keep updating this plugin to work with new versions of LESS and try to add new features.
Enjoy.
Question for Blumentals developers: Script.TimeOut looks buggy - it calls the callback function immediately, even if the timeout is really big (like 1000000). Can you help? (see the commented line in plugin file). Thanks
EDIT: Updated to version 1.1
EDIT2: Updated to version 1.2