Skip to content

Instantly share code, notes, and snippets.


mindy grittymindy

View GitHub Profile
grittymindy / gist:864a775911554c44e6d6
Last active Aug 29, 2015
View gist:864a775911554c44e6d6

##The basic proposal is:

  1. pack the js bundle within the app itself
  2. Each time you app is lauched, try to check with your server if your local js bundle need to be updated. If so, download the latest js bundle from your server, and save it into the sandbox. Say the destination path is DIR_FOR_JS.
  3. Your code loading js files should be like this:
    if(file exists in DIR_FOR_JS)
        load the file from DIR_FOR_JS
        load the file packed in your app