mozilla-b2g/gaia-email-libs-and-more — pull request #86 by jrburke (2012-11-22 23:32:22+00:00)
Title: Refs #814273, copy over email backend code to gaia

First pass at this. Not wired up to Makefile yet. Can be tried by doing the following:

cd scripts
node copy-to-gaia.js /path/to/gaia/apps/email

Then make sure `gaia/apps/email/index.html` has the following comments around the script tag for "js/ext/gaia-email-opt.js":

```html

```

So the main action is in scripts/copy-to-gaia.js.

I am not sure this is an overall win though. While it is cool to have almond.js in the app, which would be great to use to organize the other code in email app, there are *lots* of extra script tags in the document, and startup feels slower to me now than having it all bundled.

While I upgraded almond.js to the latest 0.2.1 release, to get the "delayed define factory calling" by default, I do not suspect that is the issue, and may be more with loading all the script tags.

It may all be due to me testing on desktop in debug mode, so network requests were involved. It would be interesting to try on an actual device.

If this seems useful, I would like some guidance on how this should be wired up to the Makefile. In particular, not sure if to ask for a path, assume one/assume the user has a symlink to the gaia repo in play.