From 9aa1d5a26ccad8c192d3722e7e36fc7d6407cf69 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Mon, 3 Mar 2014 18:50:59 -0800 Subject: [PATCH 1/2] Okay, we'll just let Cloudflare compress things. --- server_setup.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server_setup.coffee b/server_setup.coffee index ff04b7b15..d15035c53 100644 --- a/server_setup.coffee +++ b/server_setup.coffee @@ -47,8 +47,7 @@ setupExpressMiddleware = (app) -> app.use(express.bodyParser()) app.use(express.methodOverride()) app.use(express.cookieSession({secret:'defenestrate'})) - if config.isProduction - app.use(express.compress()) + #app.use(express.compress()) if config.isProduction # just let Cloudflare do it setupPassportMiddleware = (app) -> app.use(authentication.initialize()) From 2f653c966e7775648fba3efc57100d3b7cff4762 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 4 Mar 2014 08:30:50 -0800 Subject: [PATCH 2/2] Simulator now swaps in empty methods when code doesn't compile. --- app/lib/simulator/Simulator.coffee | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/lib/simulator/Simulator.coffee b/app/lib/simulator/Simulator.coffee index 521e810c7..f92bccb98 100644 --- a/app/lib/simulator/Simulator.coffee +++ b/app/lib/simulator/Simulator.coffee @@ -207,7 +207,12 @@ module.exports = class Simulator transpileSpell: (thang, spellKey, methodName) -> slugifiedThangID = _.string.slugify thang.id source = @currentUserCodeMap[[slugifiedThangID,methodName].join '/'] ? "" - @spells[spellKey].thangs[thang.id].aether.transpile source + aether = @spells[spellKey].thangs[thang.id].aether + try + aether.transpile source + catch e + console.log "Couldn't transpile #{spellKey}:\n#{source}\n", e + aether.transpile '' createAether: (methodName, method) -> aetherOptions =