How to get an ultra minimized version of TW5

319 views
Skip to first unread message

Danielo Rodríguez

unread,
May 17, 2015, 8:13:44 AM5/17/15
to tiddl...@googlegroups.com
Hello,

I want to get a TW5 as barebones as possible, with only the parts I know I will need. I'm not talking about an empty version, neither a minimized one. I'm talking about getting rid of some core widgets and functionalities that I don't want or need at certain scenarios. I though about using some filter to remove that particular tiddlers on the build section of tiddlywiky.info. Is that correct? If so, could someone post me an example?

Another topic for improvement would be to get a minimized version of the core.

Thanks to anyone who helps me.

David Gifford

unread,
May 17, 2015, 8:36:40 AM5/17/15
to tiddl...@googlegroups.com
The language components take up a fair bit of filesize, I think. Would be nice to have a TW5 without them. But that is probably wishful thinking as I think they are pretty much inextricably engraved into TW5.

Dave

Felix Küppers

unread,
May 17, 2015, 9:36:00 AM5/17/15
to tiddl...@googlegroups.com
Hola,

> Another topic for improvement would be to get a minimized version of the core.


I posted here: https://github.com/Jermolene/TiddlyWiki5/issues/1643

-Felix

PMario

unread,
May 17, 2015, 10:35:49 AM5/17/15
to tiddl...@googlegroups.com
On Sunday, May 17, 2015 at 2:36:40 PM UTC+2, David Gifford wrote:
The language components take up a fair bit of filesize, I think. Would be nice to have a TW5 without them. But that is probably wishful thinking as I think they are pretty much inextricably engraved into TW5.

The language files have always been plugins. Just tiddlywiki.com included them all. If you have a look at tiddlywiki.com, there is only english left.
All other languages are installed as plugins from the ControlPanel.

-m

David Gifford

unread,
May 17, 2015, 10:55:10 AM5/17/15
to tiddl...@googlegroups.com
Hi Mario,

I meant the shadow tiddlers for translating core features. Sorry I wasn't clear.

Dave

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/xzkwFMCpfCc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/8f82c6b3-9437-4c0d-a6c1-1ae3392d9e0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeremy Ruston

unread,
May 18, 2015, 1:27:55 PM5/18/15
to TiddlyWiki
Hi Danielo

If you want to build a custom version of the core plugin then the first and most important thing is: please don't call it "$:/core"; something like "$:/core/danielo-minimum" would be better.

Anyhow, the current process used under Node.js to build the `$:/core` plugin includes all the tiddlers found by recursively loading the `core` folder in the repo. It's not currently possible to omit individual tiddlers except by deleting them. If you're working on a fork of the TW5 repo then that's probably a reasonable approach; it will make your changes clearly evident.

Best wishes

Jeremy.




--
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 post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.

For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

PMario

unread,
May 18, 2015, 1:43:56 PM5/18/15
to tiddl...@googlegroups.com, jeremy...@gmail.com
On Monday, May 18, 2015 at 7:27:55 PM UTC+2, Jeremy Ruston wrote:
Anyhow, the current process used under Node.js to build the `$:/core` plugin includes all the tiddlers found by recursively loading the `core` folder in the repo. It's not currently possible to omit individual tiddlers except by deleting them.

Jeremy,
Wouldn't it be possible to use the tiddlywiki.files configuration to specify the files which should be included?
-m

Jeremy Ruston

unread,
May 18, 2015, 1:50:30 PM5/18/15
to PMario, TiddlyWiki
Hi Mario

Wouldn't it be possible to use the tiddlywiki.files configuration to specify the files which should be included?

Yes, one could add a tiddlywiki.files in the `core` folder. One would have to explicitly list each of the tiddlers which were to be included.

Best wishes

Jeremy.

 
-m

Danielo Rodríguez

unread,
May 19, 2015, 5:03:06 AM5/19/15
to tiddl...@googlegroups.com, pmar...@gmail.com, jeremy...@gmail.com


El lunes, 18 de mayo de 2015, 19:50:30 (UTC+2), Jeremy Ruston escribió:
Hi Mario

Wouldn't it be possible to use the tiddlywiki.files configuration to specify the files which should be included?

Yes, one could add a tiddlywiki.files in the `core` folder. One would have to explicitly list each of the tiddlers which were to be included.

Best wishes

Jeremy.

Hello Jeremy, if you include the tiddlywiki.files will it take precedence over the normal flow? So the files not listed will not be included?

Jeremy Ruston

unread,
May 19, 2015, 5:13:44 AM5/19/15
to Danielo Rodríguez, TiddlyWiki, Mario Pietsch
Hi Danielo

Hello Jeremy, if you include the tiddlywiki.files will it take precedence over the normal flow? So the files not listed will not be included?

That's correct, yes. See the docs here:


Best wishes

Jeremy.

 

BJ

unread,
May 19, 2015, 9:10:08 AM5/19/15
to tiddl...@googlegroups.com, rdan...@gmail.com, jeremy...@gmail.com, pmar...@gmail.com
Is it possible to may changes that would only take effect in the browser - ie make an alternative core plugin that only would only be unpacked in the browser?
cheers
BJ

Jeremy Ruston

unread,
May 19, 2015, 2:32:03 PM5/19/15
to BJ, TiddlyWiki, Danielo Rodríguez, Mario Pietsch
Hi BJ

On Tue, May 19, 2015 at 2:10 PM, BJ <bugg...@gmail.com> wrote:
Is it possible to may changes that would only take effect in the browser - ie make an alternative core plugin that only would only be unpacked in the browser?

I'd been thinking of achieving that via this ticket:


Otherwise, I think some hacked templates would probably do the trick.

Best wishes

Jeremy.

 
cheer

BJ


On Tuesday, May 19, 2015 at 10:13:44 AM UTC+1, Jeremy Ruston wrote:
Hi Danielo

Hello Jeremy, if you include the tiddlywiki.files will it take precedence over the normal flow? So the files not listed will not be included?

That's correct, yes. See the docs here:


Best wishes

Jeremy.

 



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Danielo Rodríguez

unread,
May 19, 2015, 4:51:28 PM5/19/15
to tiddl...@googlegroups.com
Hello BJ,

What is the purpose of such feature?

BJ

unread,
May 20, 2015, 3:54:51 AM5/20/15
to tiddl...@googlegroups.com


On Tuesday, May 19, 2015 at 9:51:28 PM UTC+1, Danielo Rodríguez wrote:
Hello BJ,

What is the purpose of such feature?

Hi Danielo,
like you I want to produce variations of the core plugin. At the moment when building the tiddlywiki the boot.js unpacks all plugins into the node.js tiddlywiki - there is no way to specify that a plugin is for the browser only. So if I have a plugin called core-min which contains modified javascript of the core  - it will be unpacked by the bootloader into the node.js version of tiddlywiki and break it.

Maybe a way to separate out the core-min is to set its plugin-type" to "plugin-browser" in its plugin.info file. - this will stop the boot.js from unpacking it. Then have a template $:/core/save/all-coremin that will act like the template $:/core/save/all but will exclude the core and change the plugin-type of core-min to "plugin".
Thre may also need to be a modified version of  "$:/core/templates/tiddlywiki5.html" - I don't know yet

Note that I have not tried this yet.

cheers

BJ

BJ

unread,
May 21, 2015, 7:37:24 AM5/21/15
to tiddl...@googlegroups.com
seems to work

Danielo Rodríguez

unread,
May 21, 2015, 6:23:33 PM5/21/15
to tiddl...@googlegroups.com


El jueves, 21 de mayo de 2015, 13:37:24 (UTC+2), BJ escribió:
seems to work

What seems to work? 

BJ

unread,
May 22, 2015, 2:27:20 PM5/22/15
to tiddl...@googlegroups.com

  1. copy core to plugins/bj/corenew
  2. in plugin.info set "plugin-type" to "plugin-browser"
  3. have a maco  to change corenew "plugin-type" to "plugin"
    exports.name = "changecore"; exports.params = [ ]; /* Run the macro */ exports.run = function() { var tiddler = $tw.wiki.getTiddler("$:/plugins/bj/corenew"), updateFields = { title: "$:/plugins/bj/corenew" }; updateFields["plugin-type"] = "plugin"; $tw.wiki.addTiddler(new $tw.Tiddler($tw.wiki.getCreationFields(),tiddler,updateFields,$tw.wiki.getModificationFields())) } })();
  4. have a template to remove core and call macro
    \define saveTiddlerFilter() [is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] -[[$:/core]] \end <<changecore>> {{$:/core/templates/tiddlywiki5.html}}
  5. build using this new macro from nodejs
Note that these macro and template tiddlers cannot be in the corenew plugin, (as it is not unpacked in the nodejs) but must be included in the 'tiddlers' directory. Alternatively they could be made into separate plugin.

cheers
BJ
Reply all
Reply to author
Forward
0 new messages