diff --git a/Makefile.dryice.js b/Makefile.dryice.js index 54eb7ed0..3b53a2db 100755 --- a/Makefile.dryice.js +++ b/Makefile.dryice.js @@ -395,7 +395,7 @@ function buildAce(options) { 'ace/lib/fixoldbrowsers', 'ace/lib/event_emitter', 'ace/lib/oop', - 'ace/worker/' + mode + 'ace/mode/' + mode + '_worker' ] }], filter: filters, diff --git a/lib/ace/config.js b/lib/ace/config.js index 9e9679c2..dccbb484 100644 --- a/lib/ace/config.js +++ b/lib/ace/config.js @@ -77,11 +77,11 @@ exports.moduleUrl = function(name, component) { return options.$moduleUrls[name]; var parts = name.split("/"); - component = component || parts[1]; - var base = parts[2].replace(component, "").replace(/(^[\-_])|([\-_]$)/, ""); + component = component || parts[parts.length - 2] || ""; + var base = parts[parts.length - 1].replace(component, "").replace(/(^[\-_])|([\-_]$)/, ""); - if (!base) - base = parts[1]; + if (!base && parts.length > 1) + base = parts[parts.length - 2]; return this.get(component + "Path") + "/" + component + "-" + base + this.get("suffix"); };