diff --git a/tools/BuildTools.js b/tools/BuildTools.js index 5fd31fe2cbf..6c627892656 100644 --- a/tools/BuildTools.js +++ b/tools/BuildTools.js @@ -89,47 +89,6 @@ exports.less = function (options) { strictImports: options.strictImports }); - // Patch over BOM bug - // Todo: Remove this when they fix the bug - less.Parser.importer = function (file, paths, callback, env) { - var pathname; - - paths.unshift('.'); - - for (var i = 0; i < paths.length; i++) { - try { - pathname = path.join(paths[i], file); - fs.statSync(pathname); - break; - } catch (e) { - pathname = null; - } - } - - if (pathname) { - fs.readFile(pathname, 'utf-8', function(e, data) { - if (e) { - return callback(e); - } - - data = data.replace(/^\uFEFF/, ''); - - new(less.Parser)({ - paths: [path.dirname(pathname)].concat(paths), - filename: pathname - }).parse(data, function (e, root) { - callback(e, root, data); - }); - }); - } else { - if (typeof(env.errback) === "function") { - env.errback(file, paths, callback); - } else { - callback({ type: 'File', message: "'" + file + "' wasn't found.\n" }); - } - } - }; - // Parse one or multiple files if (sourceFile instanceof Array) { sourceFile.forEach(function(sourceFile) {