Fix building of themes
This commit is contained in:
parent
5f203ae4f5
commit
da94ecdb42
1 changed files with 3 additions and 3 deletions
|
|
@ -347,14 +347,14 @@ function buildAce(aceProject, options) {
|
|||
});*/
|
||||
// use this instead, to not create separate modules for js and css
|
||||
var themePath = "lib/ace/theme/" + theme
|
||||
var js = fs.readFileSync(themePath + ".js", "utf8")
|
||||
js = js.replace("define(", "define('ace/theme/" + theme + "',")
|
||||
var js = fs.readFileSync(themePath + ".js", "utf8");
|
||||
js = js.replace("define(", "define('ace/theme/" + theme + "', ['require', 'exports', 'module', 'ace/lib/dom'], ");
|
||||
|
||||
if (fs.existsSync(themePath + ".css", "utf8")) {
|
||||
var css = fs.readFileSync(themePath + ".css", "utf8")
|
||||
js = js.replace(/require\(.ace\/requirejs\/text!.*?\)/, quoteString(css))
|
||||
}
|
||||
filters.forEach(function(f) {js = f(js); })
|
||||
filters.forEach(function(f) {js = f(js); });
|
||||
|
||||
fs.writeFileSync(targetDir + suffix + "/theme-" + theme + ".js", js);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue