Require will parse .less files into css

This commit is contained in:
probablycorey
2013-02-28 14:27:56 -08:00
committed by Corey Johnson
parent bf7e2d38f7
commit 0b674978db
5 changed files with 5113 additions and 0 deletions

View File

@@ -66,6 +66,13 @@ exts =
evaluated = exts.js(file, compiled)
$native.write(cacheFilePath, compiled) if writeToCache
evaluated
less: (file) ->
output = ""
(new less.Parser).parse __read(file), (e, tree) ->
throw new Error(e.message, file, e.line) if e
output = tree.toCSS()
output
getPath = (path) ->
path = resolve(path)