Skip to content

Instantly share code, notes, and snippets.

@parshap
Created December 9, 2013 20:12
Show Gist options
  • Save parshap/7879975 to your computer and use it in GitHub Desktop.
Save parshap/7879975 to your computer and use it in GitHub Desktop.
Compile multiple less sources and concat results
module.exports = function(sources, options, callback) {
if ( ! callback) {
callback = options;
options = {};
}
options = _.defaults(options, LESS_OPTIONS);
async.map(sources, function(source, callback) {
compile(source, options, callback);
}, function(err, results) {
if (err) return callback(err);
callback(null, results.join("\n"));
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment