- Notifications
You must be signed in to change notification settings - Fork7
Atom plugin to compile .less files on save.
License
schmuli/atom-less
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
An Atom package that auto-compiles LESS files on save, with support for LESS plugins, Clean-CSS and AutoPrefixer.
I'm sorry but the code hasn't been updated in a long time, since I am no longer using Atom, and therefore not maintaining the code anymore or publishing new versions.
Sorry about that. If you would like to take ownership of the code and plugin, please open a new issue.
On the first line of LESS files, add a valid JSON comment, not including the outer brackets ('{' and '}'), with the following properties:
- "main":
string-The relative or absolute path to the main LESS file to be compiled (ignores all other options) - "out":
boolean|string-trueto output using the filename, or a string specifying a name to use - "compress":
boolean-Use Less.JS built-in compression (not compatible with Clean-CSS or Source Maps) - "strictMath":
boolean-Require brackets around math expressions - "sourceMap":
boolean|Object-trueto turn on source maps, or an object specifying LESS source map properties - "cleancss":
string|object-a string specifying the 'compatibility' property, or an object specifying the Clean-CSS properties (not compatible with Source Maps) - "autoprefix":
string|object-a string specifying the 'browsers' property, or an object specifying the AutoPrefixer properties
Other LESS compiler options might work but are untested at this point.
Please see theLess documentation for sourcemap configuration options.
Please see theAutoPrefixer documention for configuration options.
Please see theClean CSS documentation for configuration options.
Say you have two Less files,main.less andcomponent.less.
main.less defines the generated file namemain.css, and also provides the other configurations, for example compression and AutoPrefixer options (see above for syntax):
// "out": "main.css", "compress": true, "autoprefix": "last 2 versions"@import"component.less";html,body {height:100%;}
component.less just indicates the file that imports it (in this casemain.less) and defines its own styles:
// "main": "main.less"component {border:solid1pxblack;}
- Remove dependency on inline comments, and instead use a .lesscfg project file, allowing easier configuration and automatic support of additional LESS plugins
- Change callback passing to use Promises
About
Atom plugin to compile .less files on save.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Contributors2
Uh oh!
There was an error while loading.Please reload this page.