Merge pull request #941 from ajaxorg/worker

Worker refactor
This commit is contained in:
Mostafa Eweda 2012-10-03 02:34:47 -07:00
commit 7cdc24cd64
23 changed files with 2945 additions and 12004 deletions

View file

@ -6,13 +6,15 @@ var https = require("https")
var rootDir = __dirname + "/../lib/ace/"
var deps = [{
path: "worker/jshint.js",
path: "mode/javascript/jshint.js",
url: "https://raw.github.com/jshint/jshint/master/jshint.js",
needsFixup: true
}, {
path: "worker/jslint.js",
url: "https://raw.github.com/douglascrockford/JSLint/master/jslint.js",
needsFixup: true
needsFixup: true,
postProcess: function(t) {
return t.replace(
/"Expected a conditional expression and instead saw an assignment."/g,
'"Assignment in conditional expression"'
);
}
}, {
path: "mode/css/csslint.js",
url: "https://raw.github.com/stubbornella/csslint/master/release/csslint-node.js",
@ -43,7 +45,9 @@ var getDep = function(dep) {
data = "define(function(require, exports, module) {\n"
+ data
+ "\n});"
if (dep.postProcess)
data = dep.postProcess(data)
fs.writeFile(rootDir + dep.path, data, "utf-8", function(err){
if (err) throw err
console.log("File " + dep.path + " saved.")