Hey Mohammad, Currently, the bulk of the compression occurs in the javascript, but it does optimize all plugins somewhat by improving the way they're packed. Commander will come down a bit in size.
I'd love to have wikitext compression too; there are some things I can do. But it's super tricky. Unlike javascript, wikitext is dependent on white space. Definitely not sure if I could reduce them by over 60% like you're suggesting though, unless you're thinking of stream compression, but that'd be outside the scope of this plugin. -Flibbles On Tuesday, January 19, 2021 at 10:37:19 PM UTC-5 Mohammad wrote: > Hi Flibbles > > This is amazing! I am one of those who request for a minified TW5 and you > did it! > > The empty.html for TW5.1.24 is 2371 kB and the Uglified TW 5.1.24 is 1297 > kB EXCELLENT!! around 50% smaller! > We have a big pain distributing a TW with required plugins (empty.html ~ > 4500 kB) > Love it, I will test it with much of interest. > > One question: The doc says it compresses the JS code, how about plugins > developed in pure wikitext? Commander is around 112kB, but I think it > should be 25-40kB. > What do you think? > > > Best wishes > Mohammad > > > On Tue, Jan 19, 2021 at 11:56 PM Flibbles <[email protected]> wrote: > >> Some people want a minified version of the TW5 core, but it'd be too much >> work to maintain. >> Some people think it should remain uncompressed for the sake of editors, >> but TW5 continues to grow by the day. >> Some developers compress their plugins, making efficient code, but it's a >> pain for anyone debugging it. >> Some developers leave their plugins uncompressed, but that means it's >> larger than necessary for 90% of all end-users. >> >> Now there's a solution for everybody: TW5-uglify. >> >> This is a plugin primarily designed to be used by a Node.JS server. Your >> server has access to all your uncompressed and unpacked plugins, which is >> fine, since servers have the speed and memory for it. But what it sends to >> browsers are fully compressed plugins. Your little smart phones and tablets >> get the efficient TW5 they deserve. >> >> Or maybe you're a plugin developer who wants to minify their code. Now >> you no longer have to resort to using npm-gulp like some kind of chump. >> Your build process can remain an entirely TiddlyWiki process. >> >> Or maybe you want to miniify your standalone TiddlyWiki file. You can, >> but... think hard about this before you do it. Because unlike with >> TW5-Uglified server, compressing your standalone files is a one-way >> process. You'll forever have compressed code unless you download a new >> Tiddlywiki, redownload all your plugins, and transfer all your tiddlers >> from your old file. But hey! Maybe you're running TiddlyWiki on your 2000 >> era Nokia phone in an wifi wasteland. Then go ahead. >> >> Check it out. >> Here's the demo site. <https://flibbles.github.io/tw5-uglify/> >> And here's the github page <https://github.com/flibbles/tw5-uglify>. >> >> Let me know what you all think. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "TiddlyWiki" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/tiddlywiki/2ce6fad2-8600-4c73-940c-515548e49c1en%40googlegroups.com >> >> <https://groups.google.com/d/msgid/tiddlywiki/2ce6fad2-8600-4c73-940c-515548e49c1en%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e3868d68-0328-4fe3-88c8-067116fcbeean%40googlegroups.com.

