On top of uglifying javascript and css, the TW5-Uglifier now compresses wikitext!
Now we can all feel free to pretty print our plugins as much as we want, since we know now that we can publish compressed versions of our source, or the end-users can compress plugins themselves with the easy-to-use wizard. Don’t worry! It doesn’t touch your own tiddlers. Only plugins.
Check it out, guys. It’s kinda fun just to see what your wikitext turns into when you feed it in, and the plugin has a nice demo page.
Also, if you think this is super cool, give it a star in github so that more people can see this. The more developers that know about this, the less they’ll publish their plugins in cryptic unpretty forms like jerks, because now they’ll know there are easy ways to shrink their work down.
Just a few highlights:
- You can now customize what tiddler types Uglify compresses. For instance, maybe you want your wikitext uglified, but not your javascript? Sure thing. The wizard has a simple customize dropdown, and NodeJS servers only need a few config tiddlers.
- The wikitext uglifying applies many tricks, such as getting rid of whitespace, removing unnecessary tags, and changing attribute and parameter quotation to its most efficient alternative. All while making sure the generated html from a page is identical to what it used to be.
- Nearly 400 unit tests to ensure that uglifying does things right.
- Once Tiddlywiki V5.2.1 releases, and the new $let widget is released, there will be even more rules applied to compress wikitext.
So yeah, check it out. Also, I’ll be working with the core code over the next few weeks to optimize it for uglification (and also just improving it in general).
-Flibbles