1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00
This commit is contained in:
Michael Ficarra 2012-07-10 23:08:14 -05:00
parent 1fa3da68ba
commit a396837fa4

View file

@ -1,6 +1,6 @@
// Generated by CoffeeScript 1.3.3
(function() {
var Lexer, RESERVED, compile, fs, lexer, parser, path, vm, _ref,
var Lexer, RESERVED, compile, fs, lexer, parser, path, stripBOM, vm, _ref,
__hasProp = {}.hasOwnProperty;
fs = require('fs');
@ -13,12 +13,20 @@
vm = require('vm');
stripBOM = function(content) {
if (content.charCodeAt(0 === 0xFEFF)) {
return content.substring(1);
} else {
return content;
}
};
if (require.extensions) {
require.extensions['.coffee'] = function(module, filename) {
var content;
content = compile(fs.readFileSync(filename, 'utf8'), {
content = compile(stripBOM(fs.readFileSync(filename, 'utf8'), {
filename: filename
});
}));
return module._compile(content, filename);
};
} else if (require.registerExtension) {