remove unnecessary use of async
This commit is contained in:
parent
d63863ac0c
commit
b42108a2c9
1 changed files with 51 additions and 53 deletions
|
|
@ -33,7 +33,6 @@ var fs = require("fs");
|
||||||
var path = require("path");
|
var path = require("path");
|
||||||
var copy = require('architect-build/copy');
|
var copy = require('architect-build/copy');
|
||||||
var build = require('architect-build/build');
|
var build = require('architect-build/build');
|
||||||
var async = require("asyncjs");
|
|
||||||
|
|
||||||
var ACE_HOME = __dirname;
|
var ACE_HOME = __dirname;
|
||||||
var BUILD_DIR = ACE_HOME + "/build";
|
var BUILD_DIR = ACE_HOME + "/build";
|
||||||
|
|
@ -346,58 +345,57 @@ function buildSubmodule(options, extra, file, callback) {
|
||||||
function buildAce(options) {
|
function buildAce(options) {
|
||||||
var snippetFiles = jsFileList("lib/ace/snippets");
|
var snippetFiles = jsFileList("lib/ace/snippets");
|
||||||
var modeNames = modeList();
|
var modeNames = modeList();
|
||||||
async.forEach([
|
|
||||||
buildCore.bind(null, options, {outputFile: "ace.js"}),
|
buildCore(options, {outputFile: "ace.js"}),
|
||||||
// modes
|
// modes
|
||||||
async.forEach.bind(null, modeNames, function(name, next) {
|
modeNames.forEach(function(name) {
|
||||||
buildSubmodule(options, {
|
buildSubmodule(options, {
|
||||||
projectType: "mode",
|
projectType: "mode",
|
||||||
require: ["ace/mode/" + name]
|
require: ["ace/mode/" + name]
|
||||||
}, "mode-" + name, next);
|
}, "mode-" + name);
|
||||||
}),
|
});
|
||||||
// snippets
|
// snippets
|
||||||
async.forEach.bind(null, modeNames, function(name, next) {
|
modeNames.forEach(function(name) {
|
||||||
if (snippetFiles.indexOf(name + ".js") == -1)
|
if (snippetFiles.indexOf(name + ".js") == -1)
|
||||||
addSnippetFile(name);
|
addSnippetFile(name);
|
||||||
|
|
||||||
buildSubmodule(options, {
|
buildSubmodule(options, {
|
||||||
require: ["ace/snippets/" + name],
|
require: ["ace/snippets/" + name],
|
||||||
}, "snippets/" + name, next);
|
}, "snippets/" + name);
|
||||||
}),
|
});
|
||||||
// themes
|
// themes
|
||||||
async.forEach.bind(null, jsFileList("lib/ace/theme"), function(name, next) {
|
jsFileList("lib/ace/theme").forEach(function(name) {
|
||||||
buildSubmodule(options, {
|
buildSubmodule(options, {
|
||||||
projectType: "theme",
|
projectType: "theme",
|
||||||
require: ["ace/theme/" + name]
|
require: ["ace/theme/" + name]
|
||||||
}, "theme-" + name.replace("_theme", ""), next);
|
}, "theme-" + name.replace("_theme", ""));
|
||||||
}),
|
});
|
||||||
// keybindings
|
// keybindings
|
||||||
async.forEach.bind(null, ["vim", "emacs"], function(name, next) {
|
["vim", "emacs"].forEach(function(name) {
|
||||||
buildSubmodule(options, {
|
buildSubmodule(options, {
|
||||||
projectType: "keybinding",
|
projectType: "keybinding",
|
||||||
require: ["ace/keyboard/" + name ]
|
require: ["ace/keyboard/" + name ]
|
||||||
}, "keybinding-" + name, next);
|
}, "keybinding-" + name);
|
||||||
}),
|
});
|
||||||
// extensions
|
// extensions
|
||||||
async.forEach.bind(null, jsFileList("lib/ace/ext"), function(name, next) {
|
jsFileList("lib/ace/ext").forEach(function(name) {
|
||||||
buildSubmodule(options, {
|
buildSubmodule(options, {
|
||||||
projectType: "ext",
|
projectType: "ext",
|
||||||
require: ["ace/ext/" + name]
|
require: ["ace/ext/" + name]
|
||||||
}, "ext-" + name, next);
|
}, "ext-" + name);
|
||||||
}),
|
});
|
||||||
// workers
|
// workers
|
||||||
async.forEach.bind(null, workers("lib/ace/mode"), function(name, next) {
|
workers("lib/ace/mode").forEach(function(name) {
|
||||||
buildSubmodule(options, {
|
buildSubmodule(options, {
|
||||||
projectType: "worker",
|
projectType: "worker",
|
||||||
require: ["ace/mode/" + name + "_worker"],
|
require: ["ace/mode/" + name + "_worker"],
|
||||||
additional: [{
|
additional: [{
|
||||||
id: "ace/worker/worker",
|
id: "ace/worker/worker",
|
||||||
loaderModule: true,
|
loaderModule: true,
|
||||||
order: -1000
|
order: -1000
|
||||||
}],
|
}],
|
||||||
}, "worker-" + name, next);
|
}, "worker-" + name);
|
||||||
}),
|
});
|
||||||
], function(f, next) { f(next); });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLoadedFileList(options, callback, result) {
|
function getLoadedFileList(options, callback, result) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue