I'd like to extend ace with a mode for a custom language. As far as I can tell, the general process is:

1. Download the ace source.
2. Create a new lib/ace/mode/foo.js for your custom language.
3. run "make build" (or similar) to rebuild ACE.
4. Use the newly compiled build/src-min-no-conflict (or whatever) ACE distribution in your website.

But I want to just use an existing ACE distribution from their website, combined with my standalone new mode. I don't want to have to rebuild ACE as part of my build process in order to build my new mode. I got close by doing:

```
ace.config.setModuleUrl("foo-mode", "./foo.js");
session.setMode("foo-mode");

```

But I quickly ran into requirejs / dependency problems. For instance I couldn't do `require("ace/mode/matching_brace_outdent")` inside my mode. I temporarily hacked around that by first calling `setMode('ace/mode/c_cpp')` (which as a byproduct defines the matching\_brace\_outdent module). But I ran into even worse problems trying to get a custom WorkerClient to work.

Is my only option to build my mode as part of ACE? Or am I missing something?