

js files that do not define run.js modules (scripts that do not call run(), for example jQuery, or plugins for jQuery). This version of run has just the following features: The interesting number for me is the version of run.js without plugin support, no run.modify, no multiversion support and no page load (run.ready/DOMContentLoaded callbacks). Including both the i18n and text plugins with run.js bumps it up to 11,759 minified, 4,655 gzipped. The normal config, with no plugins included (but with plugin support) is 7,970 bytes minified, 3,167 gzipped. Google's Closure Compiler did the minification for this evaluation.
Runjs alternative code#
Let's look at the non-license sizes, since they give a better indication of code density.

Here is the breakdown (warning, Google Doc iframe inclusion, but interesting numbers inlined in this post after the iframe): I am trying to get a handle on where the bulk of implementation lies, and what features add to its file size. The build pragma support was used to build RunJS in a couple of different configurations.

Runjs alternative update#
I would probably update the text to say “Change Layout”, or better yet go a step further and pop up a menu down there when they click “Change Layout” that shows the 4 or however many options as little graphical representations of the different arrangements. So, from a UX perspective, someone using that “Toggle layout” button will have their expectations broken, since it isn’t actually performing a toggle. The issue is your “Toggle layout” is not doing a toggle - it’s cycling through your various layouts. Toggle UI components are binary, and have mutually exclusive A/B states, so I expected it to go back to the original state on the second activation. This is great, and gives us some good options for formatting, but it didn’t do what I expected when I tapped it the second time. Those settings have a check mark next to them when they’re turned on, so I would prefer the menu items not have the word “Toggle” before all of them.Īlso, a UX issue - and you’re going to think I must be toggle obsessed - you have a “Toggle layout” button at the bottom left. I opened the settings and saw “Toggle line numbers”, “Toggle word wrap”, “Toggle minimap”, etc. One small thing, on the UI front, is the repetition of the word “Toggle” in all of your menu items. Like others, I like how clean it is! I would probably keep auto run turned off, myself, just to avoid accidentally getting myself into an infinite loop.
