Skip to content

Commit

Permalink
fix modecreator
Browse files Browse the repository at this point in the history
  • Loading branch information
nightwing committed Apr 18, 2013
1 parent 5a5439f commit cf9ef32
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions tool/mode_creator.js
Expand Up @@ -145,15 +145,20 @@ function run() {
var src = editor1.getValue();
var path = "ace/mode/new";
var deps = getDeps(src, path);
src = src.replace("define(", 'define("' + path +'", ["require","exports","module",' + deps +'],');
src += ';require(["ace/mode/new"], function(e) {\
try{continueRun(e)}catch(e){log(e)}\
}, function(e){\
log(e);\
window.require.undef("ace/mode/new")\
});';
window.require.undef(path)
src = src.replace("define(", 'define("' + path +'", ["require","exports","module",' + deps +'],');
try {
eval(src);
require(["ace/mode/new"], function(e) {
try{
continueRun(e)
}catch(e){
log(e)
}
}, function(e) {
log(e);
window.require.undef(path)
});
hideLog()
} catch(e) {
log(e);
Expand Down

0 comments on commit cf9ef32

Please sign in to comment.