UNPKG

388 BJavaScriptView Raw
1'use strict';
2
3var coffee = require('coffee-script');
4var merge = require('merge');
5
6exports.name = 'coffee-script';
7exports.inputFormats = ['coffee', 'coffee-script'];
8exports.outputFormat = 'js';
9
10exports.render = function (src, options, locals) {
11 // Bring the locals into the compile options.
12 options = merge(options || {}, locals || {});
13
14 return coffee.compile(src, options);
15}