Created
March 15, 2016 18:40
-
-
Save imlucas/294d291183d8b275ded9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var LessCache = require('less-cache'); | |
var dest = path.join(CONFIG.resources, 'app', 'less-compile-cache'); | |
var src = path.join(CONFIG.resources, 'app', 'index.less'); | |
var lessCache = new LessCache({ | |
cacheDir: dest, | |
resourcePath: path.join(CONFIG.resources, 'app'), | |
importPaths: [] | |
}); | |
fs.readFile(src, 'utf-8', function(err, contents) { | |
if (err) { | |
return done(err); | |
} | |
lessCache.cssForFile(src, contents); | |
done(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment