Split out aether from vendor.js. Should help #826.

This commit is contained in:
Scott Erickson 2014-05-09 15:22:23 -07:00
parent 6d8d119c94
commit 7815951073
4 changed files with 15 additions and 10 deletions

View file

@ -1,7 +1,7 @@
var window = self;
var Global = self;
importScripts("/javascripts/tome_aether.js");
importScripts("/javascripts/lodash.js", "/javascripts/aether.js");
console.log("imported scripts!");
var aethers = {};

View file

@ -60,7 +60,7 @@ var console = {
console.error = console.info = console.log;
self.console = console;
importScripts('/javascripts/world.js');
importScripts('/javascripts/world.js', "/javascripts/lodash.js", "/javascripts/aether.js");
// We could do way more from this: http://stackoverflow.com/questions/10653809/making-webworkers-a-safe-environment
Object.defineProperty(self, "XMLHttpRequest", {

View file

@ -34,6 +34,7 @@
<script src="/lib/ace/ace.js"></script>
<!--[if IE 9]> <script src="/javascripts/vendor_with_box2d.js"></script> <![endif]-->
<!--[if !IE]><!--> <script src="/javascripts/vendor.js"></script> <!--<![endif]-->
<script src="/javascripts/aether.js"></script>
<script src="/javascripts/app.js"></script> <!-- it's all Backbone! -->
<script>

View file

@ -22,24 +22,28 @@ exports.config =
|(app[\/\\]lib[\/\\]utils.coffee)
|(vendor[\/\\]scripts[\/\\]Box2dWeb-2.1.a.3)
|(vendor[\/\\]scripts[\/\\]string_score.js)
|(bower_components[\/\\]lodash[\/\\]dist[\/\\]lodash.js)
|(bower_components[\/\\]aether[\/\\]build[\/\\]aether.js)
)///
'javascripts/app.js': /^app/
'javascripts/vendor.js': ///^(
vendor[\/\\](?!scripts[\/\\]Box2d)
|bower_components
|bower_components[\/\\](?!aether)
)///
'javascripts/vendor_with_box2d.js': ///^(
vendor[\/\\]
|bower_components # include box2dweb for profiling (and for IE9...)
|bower_components[\/\\](?!aether) # include box2dweb for profiling (and for IE9...)
)///
'javascripts/tome_aether.js': ///^(
'javascripts/lodash.js': ///^(
(bower_components[\/\\]lodash[\/\\]dist[\/\\]lodash.js)
|(bower_components[\/\\]aether[\/\\]build[\/\\]aether.js)
)///
'test/javascripts/test.js': /^test[\/\\](?!vendor)/
'test/javascripts/test-vendor.js': /^test[\/\\](?=vendor)/
'javascripts/aether.js': ///^(
(bower_components[\/\\]aether[\/\\]build[\/\\]aether.js)
)///
# 'javascripts/tome_aether.js': ///^(
# (bower_components[\/\\]lodash[\/\\]dist[\/\\]lodash.js)
# |(bower_components[\/\\]aether[\/\\]build[\/\\]aether.js)
# )///
# 'test/javascripts/test.js': /^test[\/\\](?!vendor)/
# 'test/javascripts/test-vendor.js': /^test[\/\\](?=vendor)/
order:
before: [
'bower_components/jquery/dist/jquery.js'