Add esper support

This commit is contained in:
Rob 2016-03-04 13:04:52 -08:00
parent e40b952ef2
commit f10bcd632c
7 changed files with 15 additions and 7 deletions

View file

@ -1,7 +1,7 @@
var window = self; var window = self;
var Global = self; var Global = self;
importScripts("/javascripts/lodash.js", "/javascripts/aether.js"); importScripts("/javascripts/lodash.js", "/javascripts/aether.js", "/javascripts/esper.js");
//console.log("Aether Tome worker has finished importing scripts."); //console.log("Aether Tome worker has finished importing scripts.");
var aethers = {}; var aethers = {};
var languagesImported = {}; var languagesImported = {};

View file

@ -63,7 +63,7 @@ var console = {
console.error = console.warn = console.info = console.debug = console.log; console.error = console.warn = console.info = console.debug = console.log;
self.console = console; self.console = console;
self.importScripts('/javascripts/lodash.js', '/javascripts/world.js', '/javascripts/aether.js'); self.importScripts('/javascripts/lodash.js', '/javascripts/world.js', '/javascripts/aether.js', '/javascripts/esper.js');
var myImportScripts = importScripts; var myImportScripts = importScripts;
var languagesImported = {}; var languagesImported = {};

View file

@ -61,6 +61,7 @@
<script src="/javascripts/box2d.js"></script> <script src="/javascripts/box2d.js"></script>
<script src="/javascripts/vendor.js"></script> <script src="/javascripts/vendor.js"></script>
<script src="/javascripts/aether.js"></script> <script src="/javascripts/aether.js"></script>
<script src="/javascripts/esper.js"></script>
<script src="/javascripts/app.js"></script> <script src="/javascripts/app.js"></script>
<![endif]--> <![endif]-->
<!-- IE9 cors support breaks analytics logging: http://caniuse.com/#feat=cors --> <!-- IE9 cors support breaks analytics logging: http://caniuse.com/#feat=cors -->
@ -71,6 +72,7 @@
<script src="/lib/ace/ace.js" defer></script> <script src="/lib/ace/ace.js" defer></script>
<script src="/javascripts/vendor.js" defer></script> <script src="/javascripts/vendor.js" defer></script>
<script src="/javascripts/aether.js" defer></script> <script src="/javascripts/aether.js" defer></script>
<script src="/javascripts/esper.js" defer></script>
<script src="/javascripts/app.js" defer></script> <script src="/javascripts/app.js" defer></script>
<![endif]> <![endif]>
<script> <script>

View file

@ -1,3 +1,5 @@
utils = require 'core/utils'
Aether.addGlobal 'Vector', require './world/vector' Aether.addGlobal 'Vector', require './world/vector'
Aether.addGlobal '_', _ Aether.addGlobal '_', _
@ -27,6 +29,7 @@ module.exports.createAetherOptions = (options) ->
#functionParameters: # TODOOOOO #functionParameters: # TODOOOOO
executionLimit: 3 * 1000 * 1000 executionLimit: 3 * 1000 * 1000
language: options.codeLanguage language: options.codeLanguage
useInterpreter: !!utils.getQueryVariable('esper')
parameters = functionParameters[options.functionName] parameters = functionParameters[options.functionName]
unless parameters unless parameters
console.warn "Unknown method #{options.functionName}: please add function parameters to lib/aether_utils.coffee." console.warn "Unknown method #{options.functionName}: please add function parameters to lib/aether_utils.coffee."

View file

@ -32,7 +32,7 @@
"firepad": "~0.1.2", "firepad": "~0.1.2",
"marked": "~0.3.0", "marked": "~0.3.0",
"moment": "~2.5.0", "moment": "~2.5.0",
"aether": "~0.4.0", "aether": "~0.4.5",
"underscore.string": "~2.3.3", "underscore.string": "~2.3.3",
"firebase": "~1.0.2", "firebase": "~1.0.2",
"d3": "~3.4.4", "d3": "~3.4.4",
@ -48,7 +48,8 @@
"backfire": "~0.3.0", "backfire": "~0.3.0",
"fastclick": "~1.0.3", "fastclick": "~1.0.3",
"three.js": "~0.71.0", "three.js": "~0.71.0",
"lscache": "~1.0.5" "lscache": "~1.0.5",
"esper.js": "http://files.codecombat.com/esper.tar.gz"
}, },
"overrides": { "overrides": {
"backbone": { "backbone": {

View file

@ -93,12 +93,12 @@ exports.config =
#- vendor.js, all the vendor libraries #- vendor.js, all the vendor libraries
'javascripts/vendor.js': [ 'javascripts/vendor.js': [
regJoin('^vendor/scripts/(?!(Box2d|coffeescript|difflib|diffview|jasmine))') regJoin('^vendor/scripts/(?!(Box2d|coffeescript|difflib|diffview|jasmine))')
regJoin('^bower_components/(?!(aether|d3|treema|three.js))') regJoin('^bower_components/(?!(aether|d3|treema|three.js|esper.js))')
'bower_components/treema/treema-utils.js' 'bower_components/treema/treema-utils.js'
] ]
'javascripts/whole-vendor.js': if TRAVIS then [ 'javascripts/whole-vendor.js': if TRAVIS then [
regJoin('^vendor/scripts/(?!(Box2d|jasmine))') regJoin('^vendor/scripts/(?!(Box2d|jasmine))')
regJoin('^bower_components/(?!aether)') regJoin('^bower_components/(?!aether|esper.js)')
] else [] ] else []
#- Other vendor libraries in separate bunches #- Other vendor libraries in separate bunches
@ -109,6 +109,7 @@ exports.config =
'javascripts/box2d.js': regJoin('^vendor/scripts/Box2dWeb-2.1.a.3') 'javascripts/box2d.js': regJoin('^vendor/scripts/Box2dWeb-2.1.a.3')
'javascripts/lodash.js': regJoin('^bower_components/lodash/dist/lodash.js') 'javascripts/lodash.js': regJoin('^bower_components/lodash/dist/lodash.js')
'javascripts/aether.js': regJoin('^bower_components/aether/build/aether.js') 'javascripts/aether.js': regJoin('^bower_components/aether/build/aether.js')
'javascripts/esper.js': 'bower_components/esper.js/esper.js'
'javascripts/app/vendor/aether-clojure.js': 'bower_components/aether/build/clojure.js' 'javascripts/app/vendor/aether-clojure.js': 'bower_components/aether/build/clojure.js'
'javascripts/app/vendor/aether-coffeescript.js': 'bower_components/aether/build/coffeescript.js' 'javascripts/app/vendor/aether-coffeescript.js': 'bower_components/aether/build/coffeescript.js'
'javascripts/app/vendor/aether-io.js': 'bower_components/aether/build/io.js' 'javascripts/app/vendor/aether-io.js': 'bower_components/aether/build/io.js'
@ -158,6 +159,7 @@ exports.config =
'bower_components/tv4/tv4.js' 'bower_components/tv4/tv4.js'
# Aether before box2d for some strange Object.defineProperty thing # Aether before box2d for some strange Object.defineProperty thing
'bower_components/aether/build/aether.js' 'bower_components/aether/build/aether.js'
'bower_components/esper.js/esper.js'
'bower_components/fastclick/lib/fastclick.js' 'bower_components/fastclick/lib/fastclick.js'
'bower_components/d3/d3.min.js' 'bower_components/d3/d3.min.js'
'vendor/scripts/async.js' 'vendor/scripts/async.js'

View file

@ -52,7 +52,7 @@
"dependencies": { "dependencies": {
"JQDeferred": "~2.1.0", "JQDeferred": "~2.1.0",
"ace-builds": "https://github.com/ajaxorg/ace-builds/archive/3fb55e8e374ab02ce47c1ae55ffb60a1835f3055.tar.gz", "ace-builds": "https://github.com/ajaxorg/ace-builds/archive/3fb55e8e374ab02ce47c1ae55ffb60a1835f3055.tar.gz",
"aether": "~0.4.0", "aether": "~0.4.5",
"async": "0.2.x", "async": "0.2.x",
"aws-sdk": "~2.0.0", "aws-sdk": "~2.0.0",
"bayesian-battle": "0.0.7", "bayesian-battle": "0.0.7",