It took me some time to understand that this idea of @Mohammad is great: Tiddlywiki is a great prototyping tool, and the expanded features made it better in this. It is a Swiss-army knife, but sometimes, in the end I only need the tweezers.
In most of my wikis, three times more functions than I need and it would be elegant to deliver only what is uses.
Here a “coreshrinker” could be very helpful. Of course there is already @Flibbles uglify but the coreshrinker could go farther. As I understand, the process should be reversible. Just drag your shrunken wiki on the current updater and get back your Swiss-army-knife.
Uglify is already configured to remove features. Currently, it can remove all server features, since most people don’t need that. If there is interest, I can add more filters. Such as making it read only, or remove palette and theme configurators. Stuff like that.
Removing filter operators is trickier, since they can be glommed together in large files, and it’s hard to identify which ones are used and which ones aren’t.
Hi @Flibbles, it would be great to filter for every function and class that is not needed to build the content.
Would this work as I hoped?
A readonly option would interest a lot of people I think, me included : Search results for 'read-only' - Talk TW
Options for removing core features like unused palettes and the like would be great for tiddlyhost, usually to save space I take the time to externalize my plugins and themes on github page with the externaljs addon, but with your plugins I wouldn’t need to do that anymore
All right, @telumire. Done!
I’ve pushed a new version of Uglify that can prune out all (most?) components involving editing/creating new/deleting tiddlers. It’s under the “customize” dropdown in the Uglify wizard. Here in the documentation, it lists all the shadow tiddlers it scraps as it uglifies.
I’ll properly document and make discoverable this feature in a bit, but in the meantime, I’m happy to hear feedback. I want to make sure this feature does what people needs. An “unused palettes and themes” pruner is also possible, but that’ll be another night when I have more time.
@JanJo, I hope this floats your boat too. The uglify pruner removes modules and shadow tiddlers. It can’t remove individual classes or functions (It’d be too dangerous.) But I hope this suits your needs.
I forgot the links!
Here’s the wizard.
Here’s where in the documentation it describes what the prune rule removes.
Awesome! I tested it, seems to works really well. One suggestion: the keyboard shortcut to create a tiddler still works (or at least partially, it create draft tiddlers but this doesn’t trigger the saving mechanism), imo shortcuts related to editing / creating tiddlers should be prunned too. The wiki I uglified went from 4.5MB to 2.88MB, that’s very nice. Thanks for your work @Flibbles !
I have finished this feature and taken you feedback. Pruning is now live, along with unused palette and theme cutting. And it’s careful to remove keyboard shortcuts for editing as well.