diff --git a/appengine/README.txt b/appengine/README.txt index 6ad341cb1..c836439c4 100644 --- a/appengine/README.txt +++ b/appengine/README.txt @@ -30,6 +30,7 @@ blockly/ |- blocks_compressed.js |- dart_compressed.js |- javascript_compressed.js + |- lua_compressed.js |- php_compressed.js `- python_compressed.js diff --git a/build.py b/build.py index 8777a13e9..52701d8d9 100755 --- a/build.py +++ b/build.py @@ -33,6 +33,7 @@ # javascript_compressed.js: The compressed Javascript generator. # python_compressed.js: The compressed Python generator. # dart_compressed.js: The compressed Dart generator. +# lua_compressed.js: The compressed Lua generator. # msg/js/.js for every language defined in msg/js/.json. import sys @@ -178,6 +179,7 @@ class Gen_compressed(threading.Thread): self.gen_generator("python") self.gen_generator("php") self.gen_generator("dart") + self.gen_generator("lua") def gen_core(self): target_filename = "blockly_compressed.js" diff --git a/demos/blockfactory/index.html b/demos/blockfactory/index.html index e9d31e633..447588557 100644 --- a/demos/blockfactory/index.html +++ b/demos/blockfactory/index.html @@ -161,6 +161,7 @@ + diff --git a/demos/code/code.js b/demos/code/code.js index 66ca98a81..5380cdf9b 100644 --- a/demos/code/code.js +++ b/demos/code/code.js @@ -244,7 +244,7 @@ Code.LANG = Code.getLang(); * List of tab names. * @private */ -Code.TABS_ = ['blocks', 'javascript', 'php', 'python', 'dart', 'xml']; +Code.TABS_ = ['blocks', 'javascript', 'php', 'python', 'dart', 'lua', 'xml']; Code.selected = 'blocks'; @@ -341,6 +341,14 @@ Code.renderContent = function() { code = prettyPrintOne(code, 'dart'); content.innerHTML = code; } + } else if (content.id == 'content_lua') { + code = Blockly.Lua.workspaceToCode(Code.workspace); + content.textContent = code; + if (typeof prettyPrintOne == 'function') { + code = content.innerHTML; + code = prettyPrintOne(code, 'lua'); + content.innerHTML = code; + } } }; diff --git a/demos/code/index.html b/demos/code/index.html index 747aaa253..25ecf6864 100644 --- a/demos/code/index.html +++ b/demos/code/index.html @@ -12,6 +12,7 @@ + @@ -41,6 +42,8 @@   Dart   + Lua +   XML