Re: [tw5] [Plugin] Presenting TW5-Uglify! Plugin compression the TiddlyWIki way!

2021-06-20 Thread Flibbles
I'm not sure how you're "servering versions" or even what that means, but I 
assume it's about generating standalone tiddlywiki files from a NodeJS 
tiddlywiki. If that's the case, then a publish-filter already exists. It's 
part of the "rendertiddler" command. You can see the uglify tiddlywiki.info 
file for an example of how to generate a tiddlywiki file without certain 
plugins or files. In Uglify's case, it creates one without the jasmine 
plugin, or any tiddlers with the "Test/' prefix.

-Flibbles

On Saturday, June 19, 2021 at 6:21:39 AM UTC-4 Jan wrote:

> Hi Flibbles, 
> I think a publish filter is a good idea, I wanted to do that for years 
> with Mat's publish-plugin but lost it out of sight. What is the best tool 
> to do this right now?
> It would be interesting to combine this with your plugin to have the 
> maximum reduction.
>
> Best wishes Jan
>
> Am Sa., 19. Juni 2021 um 01:21 Uhr schrieb Flibbles <
> challenge...@gmail.com>:
>
>> Hey Jan,
>>
>> I'm glad Uglify works well for you. To answer your questions
>>
>>
>>1. Removing overridden core Tiddlers could reduce the code size 
>>somewhat, but I'm not sure how often that use case would come up. Even in 
>>my beastly TiddlyWiki projects, my overridden tiddlers don't make up very 
>>much space, particularly since I (and most people I'd think) only 
>> override 
>>smallish tiddlers. If it's something larger, a monkey-patch injection is 
>>used more often. Meanwhile, removing those overridden shadows could lead 
>> to 
>>a whole slew of nasty bugs if someone A) Removed the override down the 
>>line, or B) Tried to export their project into any form other than 
>> exactly 
>>what it is.
>>2. Temporarily removing deactivated plugins seems out of scope for a 
>>content compression plugin (But just by a little. It compresses plugins. 
>>Removing them is a different job), and it's probably best done by the 
>> user. 
>>If they are serving versions of a tiddler where they want certain plugins 
>>excluded, they'd could use the publishFilter. A slightly elaborate 
>>tiddly-filter could exclude all deactivated plugins.
>>
>>
>> Hope this helps!
>> -Flibbles
>>
>> On Friday, June 18, 2021 at 6:45:03 PM UTC-4 Jan wrote:
>>
>>> Hi Flibbles,
>>> great idea! My wikis tended to grow recently this seems to be a great 
>>> remedy.
>>> Some Questions: Could it also remove 
>>> - overridden core Tiddlers
>>> - temporarily deactivated plugins and inactive themes 
>>> from the version which is served?
>>>
>>> Best wishes Jan
>>>
>>> Am Di., 19. Jan. 2021 um 21:26 Uhr schrieb Flibbles <
>>> challenge...@gmail.com>:
>>>
 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. 
 And here's the github page .

 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 tiddlywiki+...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/tiddlywiki/2ce6fad2-8600-4c73-940c-515548e49c1en%40googlegroups.com
  
 

Re: [tw5] [Plugin] Presenting TW5-Uglify! Plugin compression the TiddlyWIki way!

2021-06-19 Thread Jan Johannpeter
Hi Flibbles,
I think a publish filter is a good idea, I wanted to do that for years with
Mat's publish-plugin but lost it out of sight. What is the best tool to do
this right now?
It would be interesting to combine this with your plugin to have the
maximum reduction.

Best wishes Jan

Am Sa., 19. Juni 2021 um 01:21 Uhr schrieb Flibbles <
challenged.real...@gmail.com>:

> Hey Jan,
>
> I'm glad Uglify works well for you. To answer your questions
>
>
>1. Removing overridden core Tiddlers could reduce the code size
>somewhat, but I'm not sure how often that use case would come up. Even in
>my beastly TiddlyWiki projects, my overridden tiddlers don't make up very
>much space, particularly since I (and most people I'd think) only override
>smallish tiddlers. If it's something larger, a monkey-patch injection is
>used more often. Meanwhile, removing those overridden shadows could lead to
>a whole slew of nasty bugs if someone A) Removed the override down the
>line, or B) Tried to export their project into any form other than exactly
>what it is.
>2. Temporarily removing deactivated plugins seems out of scope for a
>content compression plugin (But just by a little. It compresses plugins.
>Removing them is a different job), and it's probably best done by the user.
>If they are serving versions of a tiddler where they want certain plugins
>excluded, they'd could use the publishFilter. A slightly elaborate
>tiddly-filter could exclude all deactivated plugins.
>
>
> Hope this helps!
> -Flibbles
>
> On Friday, June 18, 2021 at 6:45:03 PM UTC-4 Jan wrote:
>
>> Hi Flibbles,
>> great idea! My wikis tended to grow recently this seems to be a great
>> remedy.
>> Some Questions: Could it also remove
>> - overridden core Tiddlers
>> - temporarily deactivated plugins and inactive themes
>> from the version which is served?
>>
>> Best wishes Jan
>>
>> Am Di., 19. Jan. 2021 um 21:26 Uhr schrieb Flibbles <
>> challenge...@gmail.com>:
>>
>>> 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. 
>>> And here's the github page .
>>>
>>> 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 tiddlywiki+...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/tiddlywiki/2ce6fad2-8600-4c73-940c-515548e49c1en%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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 tiddlywiki+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/f7283bcf-1f16-426e-bfd7-402dfe712a45n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this 

Re: [tw5] [Plugin] Presenting TW5-Uglify! Plugin compression the TiddlyWIki way!

2021-06-18 Thread Flibbles
Hey Jan,

I'm glad Uglify works well for you. To answer your questions


   1. Removing overridden core Tiddlers could reduce the code size 
   somewhat, but I'm not sure how often that use case would come up. Even in 
   my beastly TiddlyWiki projects, my overridden tiddlers don't make up very 
   much space, particularly since I (and most people I'd think) only override 
   smallish tiddlers. If it's something larger, a monkey-patch injection is 
   used more often. Meanwhile, removing those overridden shadows could lead to 
   a whole slew of nasty bugs if someone A) Removed the override down the 
   line, or B) Tried to export their project into any form other than exactly 
   what it is.
   2. Temporarily removing deactivated plugins seems out of scope for a 
   content compression plugin (But just by a little. It compresses plugins. 
   Removing them is a different job), and it's probably best done by the user. 
   If they are serving versions of a tiddler where they want certain plugins 
   excluded, they'd could use the publishFilter. A slightly elaborate 
   tiddly-filter could exclude all deactivated plugins.


Hope this helps!
-Flibbles

On Friday, June 18, 2021 at 6:45:03 PM UTC-4 Jan wrote:

> Hi Flibbles,
> great idea! My wikis tended to grow recently this seems to be a great 
> remedy.
> Some Questions: Could it also remove 
> - overridden core Tiddlers
> - temporarily deactivated plugins and inactive themes 
> from the version which is served?
>
> Best wishes Jan
>
> Am Di., 19. Jan. 2021 um 21:26 Uhr schrieb Flibbles <
> challenge...@gmail.com>:
>
>> 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. 
>> And here's the github page .
>>
>> 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 tiddlywiki+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/2ce6fad2-8600-4c73-940c-515548e49c1en%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f7283bcf-1f16-426e-bfd7-402dfe712a45n%40googlegroups.com.


Re: [tw5] [Plugin] Presenting TW5-Uglify! Plugin compression the TiddlyWIki way!

2021-06-18 Thread Jan Johannpeter
Hi Flibbles,
great idea! My wikis tended to grow recently this seems to be a great
remedy.
Some Questions: Could it also remove
- overridden core Tiddlers
- temporarily deactivated plugins and inactive themes
from the version which is served?

Best wishes Jan

Am Di., 19. Jan. 2021 um 21:26 Uhr schrieb Flibbles <
challenged.real...@gmail.com>:

> 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. 
> And here's the github page .
>
> 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 tiddlywiki+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/2ce6fad2-8600-4c73-940c-515548e49c1en%40googlegroups.com
> 
> .
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CALdpFy2dNGKbe%3DYYxtK9Bii%3D5zL6NOdj%2BjerM4GEJm-3K%2Bj7cg%40mail.gmail.com.


Re: [tw5] [Plugin] Presenting TW5-Uglify! Plugin compression the TiddlyWIki way!

2021-01-20 Thread Ste

Uglified TW 5.1.24 is 1297 kB 
Time to get out the floppy disks... 
On Wednesday, 20 January 2021 at 17:32:41 UTC TiddlyTweeter wrote:

>  Flibbles wrote:
>
>> The freezing on modification is one issue I'm not sure what to do with. 
>> Apparently TW5 *completely rerenders itself* after every change, and 
>> without modifying the core, I don't think there's a way for Uglify to 
>> recognize the difference between a rendering from a change, and rendering 
>> because TW is saving to disk. 
>>
>
> *""Freezing" is NOT a problem I think! *So long as the user knows they *have 
> to wait *they won't conclude it is a crash. And I WAS aware I might need 
> to wait from the docs you provided already, so, no sweat. Though one thing 
> that users maybe need fully grasp is its use is a *one-way-ticket*. It 
> only needs to go to work once and you are done!
>
> Great piece of work!
> TT
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a90a51b3-1133-45d4-86d8-c68aac156420n%40googlegroups.com.


Re: [tw5] [Plugin] Presenting TW5-Uglify! Plugin compression the TiddlyWIki way!

2021-01-20 Thread TiddlyTweeter
 Flibbles wrote:

> The freezing on modification is one issue I'm not sure what to do with. 
> Apparently TW5 *completely rerenders itself* after every change, and 
> without modifying the core, I don't think there's a way for Uglify to 
> recognize the difference between a rendering from a change, and rendering 
> because TW is saving to disk. 
>

*""Freezing" is NOT a problem I think! *So long as the user knows they *have 
to wait *they won't conclude it is a crash. And I WAS aware I might need to 
wait from the docs you provided already, so, no sweat. Though one thing 
that users maybe need fully grasp is its use is a *one-way-ticket*. It only 
needs to go to work once and you are done!

Great piece of work!
TT

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/645da22c-663f-45c2-977e-d91fc7f1fd60n%40googlegroups.com.


Re: [tw5] [Plugin] Presenting TW5-Uglify! Plugin compression the TiddlyWIki way!

2021-01-20 Thread Flibbles
Hey @TiddlyTweeter

I checked out innerwiki.js. It's less about it being recursive, and more 
about innerwiki using async functions which are >=ECMA 6 features, and 
aren't supported by UglifyJS. No worries. It just means that single file 
wasn't compressed.

The freezing on modification is one issue I'm not sure what to do with. 
Apparently TW5 *completely rerenders itself* after every change, and 
without modifying the core, I don't think there's a way for Uglify to 
recognize the difference between a rendering from a change, and rendering 
because TW is saving to disk. Fortunately this problem only happens once 
per browser session, since results are cached, and it doesn't occur with 
NodeJS implementations.

Otherwise, glad you like it!

-Flibbles

On Wednesday, January 20, 2021 at 8:48:28 AM UTC-5 TiddlyTweeter wrote:

> *Side thoughts on text/wikitext uglification :-)*
>
> Flibbles wrote:
>
>> I'd love to have wikitext compression too; there are some things I can 
>> do. But it's super tricky. 
>>
>  
> Right. 
>
> Maybe that would a *later thought* for *other situations* than we 
> normally face? 
> I'm thinking particularly of *e-pubs *where you can have huge texts (e.g. 
> novels) with vast excess space use. But I have NO idea how you could get a 
> minify of that working in a TW. 
>
> Best wishes
> TT
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b6208e38-1995-441b-a659-96313aaf468cn%40googlegroups.com.


Re: [tw5] [Plugin] Presenting TW5-Uglify! Plugin compression the TiddlyWIki way!

2021-01-20 Thread TiddlyTweeter
*Side thoughts on text/wikitext uglification :-)*

Flibbles wrote:

> I'd love to have wikitext compression too; there are some things I can do. 
> But it's super tricky. 
>
 
Right. 

Maybe that would a *later thought* for *other situations* than we normally 
face? 
I'm thinking particularly of *e-pubs *where you can have huge texts (e.g. 
novels) with vast excess space use. But I have NO idea how you could get a 
minify of that working in a TW. 

Best wishes
TT

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/1b05e973-3527-4fdd-ad2a-89429e0e6aean%40googlegroups.com.


Re: [tw5] [Plugin] Presenting TW5-Uglify! Plugin compression the TiddlyWIki way!

2021-01-20 Thread Nicolas Petton
Flibbles  writes:

Hi Flibbles,

> Now there's a solution for everybody: TW5-uglify.

This is great! I really like the approach you took with NodeJS.

Thanks!
Nico

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/87a6t3vj7p.fsf%40petton.fr.


signature.asc
Description: PGP signature


Re: [tw5] [Plugin] Presenting TW5-Uglify! Plugin compression the TiddlyWIki way!

2021-01-20 Thread Mohammad Rahmani
Flibbles, thanks for clarification.

Best wishes
Mohammad


On Wed, Jan 20, 2021 at 7:42 AM Flibbles 
wrote:

> 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  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. 
>>> And here's the github page .
>>>
>>> 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 tiddlywiki+...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/tiddlywiki/2ce6fad2-8600-4c73-940c-515548e49c1en%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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 tiddlywiki+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/e3868d68-0328-4fe3-88c8-067116fcbeean%40googlegroups.com
> 
> .
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAAV1gMBXTc0e38YB9o%2BSiLn9xMfQKDsLmpX5TFp2bXJD6A8g%2BQ%40mail.gmail.com.


Re: [tw5] [Plugin] Presenting TW5-Uglify! Plugin compression the TiddlyWIki way!

2021-01-19 Thread Flibbles
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  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. 
>> And here's the github page .
>>
>> 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 tiddlywiki+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/2ce6fad2-8600-4c73-940c-515548e49c1en%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e3868d68-0328-4fe3-88c8-067116fcbeean%40googlegroups.com.


Re: [tw5] [Plugin] Presenting TW5-Uglify! Plugin compression the TiddlyWIki way!

2021-01-19 Thread Mohammad Rahmani
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 
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. 
> And here's the github page .
>
> 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 tiddlywiki+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/2ce6fad2-8600-4c73-940c-515548e49c1en%40googlegroups.com
> 
> .
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAAV1gMDYpd7dmKRDtSfsMAuTavWYE0hbZrK6tNF88YYb28bEoQ%40mail.gmail.com.


[tw5] [Plugin] Presenting TW5-Uglify! Plugin compression the TiddlyWIki way!

2021-01-19 Thread Flibbles
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. 
And here's the github page .

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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2ce6fad2-8600-4c73-940c-515548e49c1en%40googlegroups.com.