How can i compress all blockly framework files into 1-5 files

163 views
Skip to first unread message

Meir Yanovich

unread,
May 8, 2014, 8:02:44 AM5/8/14
to blo...@googlegroups.com
Hello all 
i want to be able  compress blockly into very few js files without using the directory's and sub directory's . 
can it be done ? 
i need it to load as resource into c++ app 

Neil Fraser

unread,
May 8, 2014, 1:58:10 PM5/8/14
to blo...@googlegroups.com
Of course, use the build.py file.  It generates the following compressed bundles:

Core Blockly:
blockly_compressed.js

Core blocks:
blocks_compressed.js

Choose your language generator:
javascript_compressed.js
python_compressed.js
dart_compressed.js

And choose your (human) language:
msg/js/en.js
msg/js/de.js
msg/js/he.js
msg/js/tlh.js
etc.

Thus you can get all of Blockly loaded in four files.  All these files are pre-complied and checked into the repo, so if you aren't modifying anything, then you don't even need to run the build script.

All the demos on this site use the above compressed bundles:
https://blockly-demo.appspot.com/static/apps/index.html

It is also possible to compress the whole of Blockly down to one file using the Closure compiler, but that's a little bit more work.



--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Neil Fraser
http://neil.fraser.name
Reply all
Reply to author
Forward
0 new messages