plasma-umass / doppio

Breaks the browser language barrier (includes a plugin-free JVM).
http://plasma-umass.github.io/doppio-demo
MIT License
2.16k stars 175 forks source link

Use Browserify or RequireJS for browser builds #249

Closed jvilk closed 11 years ago

jvilk commented 11 years ago

This is for the typed-doppio branch.

As of my latest commit, there are no circular dependencies in Typed Doppio. Unfortunately, it appears that TypeScript does not have a language-level ability to produce a single file from a multi-file project. This is my mistake from not reading the documentation clearly...

We can use something like browserify for browser builds: http://browserify.org/

There are a few issues with this, though:

  1. Ace Editor uses its own require, so its own require calls confuse Browserify.
  2. BrowserFS overrides the require functionality to allow you to use node-like require functions, which will probably muck with Browserify.
  3. Both BrowserFS and Browserify provide a path module.

... and probably more.

jvilk commented 11 years ago

On second thought, I think we can actually simply use RequireJS and its optimizer. TypeScript can produce AMD modules.

jvilk commented 11 years ago

As of the TypeScript change, we use RequireJS and its optimizer for dev and release builds.