on master help sign in
Remove jsaddleJs (correct one is in jsaddle-warp)
commit7e3f717b16e4f3c22095c68579cebd3c091a8208 authorHamish Mackenzie <Hamish.K.Mackenzie@googlemail.com> dateTue 5 Feb 2019, 20:08 (8 years ago) parente6ba1fc
1 file changed−36
jsaddle/src/Language/Javascript/JSaddle/Run/Files.hs−36
jsaddle/src/Language/Javascript/JSaddle/Run/Files.hs−36
@@ -13,7 +13,6 @@
1313
1414module Language.Javascript.JSaddle.Run.Files (
1515 indexHtml
16− , jsaddleJs
1716 , initState
1817 , runBatch
1918 , ghcjsHelpers
@@ -337,41 +336,6 @@ runBatch send sendSync = "\
337336 \ runBatch(batch);\n\
338337 \"
339338
340−-- Use this to generate this string for embedding
341−-- sed -e 's|\\|\\\\|g' -e 's|^| \\|' -e 's|$|\\n\\|' -e 's|"|\\"|g' data/jsaddle.js | pbcopy
342−jsaddleJs :: ByteString
343−jsaddleJs = "\
344− \if(typeof global !== \"undefined\") {\n\
345− \ global.window = global;\n\
346− \ global.WebSocket = require('ws');\n\
347− \}\n\
348− \\n\
349− \var connect = function() {\n\
350− \ var wsaddress =\n\
351− \ typeof window.location === \"undefined\"\n\
352− \ ? \"ws://localhost:3709/\"\n\
353− \ : window.location.protocol.replace('http', 'ws')+\"//\"+window.location.hostname+(window.location.port?(\":\"+window.location.port):\"\");\n\
354− \\n\
355− \ var ws = new WebSocket(wsaddress);\n\
356− \\n\
357− \ ws.onopen = function(e) {\n\
358− \ " <> initState <> "\
359− \\n\
360− \ ws.onmessage = function(e) {\n\
361− \ var batch = JSON.parse(e.data);\n\
362− \\n\
363− \ " <> runBatch (\a -> "ws.send(JSON.stringify(" <> a <> "));") Nothing <> "\
364− \ };\n\
365− \ };\n\
366− \ ws.onerror = function() {\n\
367− \ setTimeout(connect, 1000);\n\
368− \ };\n\
369− \}\n\
370− \\n\
371− \ " <> ghcjsHelpers <> "\
372− \connect();\n\
373− \"
374−
375339ghcjsHelpers :: ByteString
376340ghcjsHelpers = "\
377341 \function h$isNumber(o) {\