We've been discussing some ideas for improvements to the Adapt output on the chat today which we'd like to put out to the community for feedback.
First up - 'uglifying' the JSON files. It would be better for performance if the contents of the various JSON files in the build were 'uglified' - which essentially just means putting all the data on a single line (you can actually see an example of this if you look at config.json in the output). In a large JSON file, this can make quite a difference to file size - in my tests, a 94KB components.json file drops to 57KB when uglified, nearly halving load time. Clearly this means it is far less human-readable, but it's easy to 'prettify' it again, either using online tools or browser extensions - or we could easily add a grunt/gulp task to do this for you.
Next item discussed was some method of ensuring that plugins you weren't actually using would be excluded from the output, thereby reducing the footprint of the JavaScript/CSS. A few ideas as to how to determine what plugins weren't required were bandied around but I don't think we really came to any solid conclusions, so any thoughts about how best to do this would be very welcome.
Finally we discussed what to do about what we termed 'helper plugins'. These are plugins that you might well want to take advantage of during development/testing - for example, Tom Greenfields' excellent adapt-inspector, adapt-forceLoad and adapt-teleporter plugins - as well as Kineo's adapt-cheat plugin - but which you wouldn't want to leave in any final 'production-ready' build (esp. the adapt-cheat plugin!). The proposal for this was to have some way of tagging them as being 'helper plugins' - which would then allow the authoring tool to warn you after selecting 'publish' that you were using such plugins, giving you the option to exclude any/all of them from the output.
Please let us know your thoughts about these ideas.