add "highlighter" build target
This commit is contained in:
parent
51dc39bb95
commit
bb0298783c
1 changed files with 30 additions and 11 deletions
|
|
@ -71,6 +71,21 @@ function main(args) {
|
||||||
} else if (type == "full") {
|
} else if (type == "full") {
|
||||||
demo(ace());
|
demo(ace());
|
||||||
bookmarklet();
|
bookmarklet();
|
||||||
|
} else if (type == "highlighter") {
|
||||||
|
var project = buildAce({
|
||||||
|
coreOnly: true,
|
||||||
|
exportModule: "ace/ext/static_highlight",
|
||||||
|
requires: ["ace/ext/static_highlight", "ace/theme/textmate"],
|
||||||
|
readFilters: [copy.filter.moduleDefines, function(a) {
|
||||||
|
console.log(a.substring(0, 2500))
|
||||||
|
return a
|
||||||
|
}]
|
||||||
|
})
|
||||||
|
copy({
|
||||||
|
source: project.result,
|
||||||
|
filter: getWriteFilters(project.options, "main"),
|
||||||
|
dest: BUILD_DIR + "/static_highlight.js"
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -82,6 +97,7 @@ function main(args) {
|
||||||
console.log(" demo Runs demo build of Ace");
|
console.log(" demo Runs demo build of Ace");
|
||||||
console.log(" bm Runs bookmarklet build of Ace");
|
console.log(" bm Runs bookmarklet build of Ace");
|
||||||
console.log(" full all of above");
|
console.log(" full all of above");
|
||||||
|
console.log(" highlighter ");
|
||||||
console.log("args:");
|
console.log("args:");
|
||||||
console.log(" --target ./path path to build folder");
|
console.log(" --target ./path path to build folder");
|
||||||
console.log("flags:");
|
console.log("flags:");
|
||||||
|
|
@ -305,15 +321,14 @@ var buildAce = function(options) {
|
||||||
themes: jsFileList("lib/ace/theme"),
|
themes: jsFileList("lib/ace/theme"),
|
||||||
extensions: jsFileList("lib/ace/ext"),
|
extensions: jsFileList("lib/ace/ext"),
|
||||||
workers: workers("lib/ace/mode"),
|
workers: workers("lib/ace/mode"),
|
||||||
keybindings: ["vim", "emacs"]
|
keybindings: ["vim", "emacs"],
|
||||||
|
readFilters: [copy.filter.moduleDefines]
|
||||||
};
|
};
|
||||||
|
|
||||||
for(var key in defaults)
|
for(var key in defaults)
|
||||||
if (!options.hasOwnProperty(key))
|
if (!options.hasOwnProperty(key))
|
||||||
options[key] = defaults[key];
|
options[key] = defaults[key];
|
||||||
|
|
||||||
generateThemesModule(options.themes);
|
|
||||||
|
|
||||||
addSuffix(options);
|
addSuffix(options);
|
||||||
|
|
||||||
if (!options.requires)
|
if (!options.requires)
|
||||||
|
|
@ -323,6 +338,7 @@ var buildAce = function(options) {
|
||||||
var name = options.name;
|
var name = options.name;
|
||||||
|
|
||||||
var project = copy.createCommonJsProject(aceProject);
|
var project = copy.createCommonJsProject(aceProject);
|
||||||
|
project.options = options;
|
||||||
var ace = copy.createDataObject();
|
var ace = copy.createDataObject();
|
||||||
copy({
|
copy({
|
||||||
source: [ACE_HOME + "/build_support/mini_require.js"],
|
source: [ACE_HOME + "/build_support/mini_require.js"],
|
||||||
|
|
@ -333,13 +349,14 @@ var buildAce = function(options) {
|
||||||
project: project,
|
project: project,
|
||||||
require: options.requires
|
require: options.requires
|
||||||
}],
|
}],
|
||||||
filter: [ copy.filter.moduleDefines ],
|
filter: options.readFilters,
|
||||||
dest: ace
|
dest: ace
|
||||||
});
|
});
|
||||||
|
|
||||||
if (options.coreOnly)
|
if (options.coreOnly) {
|
||||||
|
project.result = ace;
|
||||||
return project;
|
return project;
|
||||||
|
}
|
||||||
copy({
|
copy({
|
||||||
source: ace,
|
source: ace,
|
||||||
filter: getWriteFilters(options, "main"),
|
filter: getWriteFilters(options, "main"),
|
||||||
|
|
@ -395,6 +412,8 @@ var buildAce = function(options) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// generateThemesModule(options.themes);
|
||||||
|
|
||||||
console.log('# ace key bindings ---------');
|
console.log('# ace key bindings ---------');
|
||||||
|
|
||||||
// copy key bindings
|
// copy key bindings
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue