Node.js workflow

116 views
Skip to first unread message

admls

unread,
Jan 18, 2019, 8:33:10 PM1/18/19
to TiddlyWikiDev
Hi All,

I'm new to tiddlywiki and programming generally. So I hope you'll pardon me if this is obvious, but I haven't quite sussed it yet.

I'm hoping to contribute to the core a bit, but I'm having trouble getting a good workflow. I followed PMario's great videos for contributing to tiddlywiki development, but I confess I'm still confused. At one point, he tested the changes he wanted to make in a singlefile build of the tw, then he went back into his text editor and made the same changes in a branch of a fork of the tw5 repo. I have been wondering if there is a workflow involving Node.js, where the changes you've made to the tiddlers while within tw are saved into your local fork of the repository. Or does the actual modification of the core have to take place in the text editor.

I've read what documentation I could find, but I can't seem to find a definitive answer.

Best wishes,
Adam

PMario

unread,
Jan 19, 2019, 7:26:26 AM1/19/19
to tiddly...@googlegroups.com
 Hi Adam,

Welcome to the club! :)

I think, you talk about this playlist: How to set up a TiddlyWiki development environment. videos 12, 13, 14 ... right.

A file TiddlyWiki, that is build with: node tiddlywiki.js editions/abcd --build index  can not write back single files to the local harddisk. ...

If we want to write single tiddlers, we need to use the --server command. ... BUT a server setting needs some adjustments to tiddlywiki.info file. It needs to include the "file-system" plugins.

    "plugins": [
        "tiddlywiki/tiddlyweb",
        "tiddlywiki/filesystem",

If these plugins are missing, you can't save!!!!!!!  See the differences in


The server setting also uses the:

    "includeWikis": [
        "../tw5.com"


setting, which will load the content from tw5.com/tiddlers/ directory. So no code duplication is needed

There is a second setting, which tells the server where to save new tiddlers.

    "config": {
        "default-tiddler-location": "../tw5.com/tiddlers"


tiddlywiki.info from editions/tw5.com  also contains

    "config": {
        "retain-original-tiddler-path": true


which allows the wiki to remember the original path from every tiddler eg: tiddlers/myPath ... and so on.
New tiddlers will be written to the default-tiddler-location specified in the server.


So if you want to change content from tiddlywiki.com you'll need to

 - create a new feature branch
 - run the server
 - change 1-3 files
 - create a PR.

Do __not__ change too many different files. It makes it much harder to get the PR merged, because there will be too much discussion.

hope that helps.

have fun!
mario






admls

unread,
Jan 19, 2019, 8:21:05 AM1/19/19
to TiddlyWikiDev
Hi Mario,

I think, you talk about this playlist: How to set up a TiddlyWiki development environment. videos 12, 13, 14 ... right.

That's the one! Thanks for making that, by the way. It has really helped me to get some kind of handle on what's going on.

This is amazingly helpful information. I'm really excited to get started and make some contributions of some kind. I'll try this out next week and I'll see then if I have correclty grokked what you've written. Thanks for your help! I never would have been able to figure this out on my own.

Best wishes,

Adam

PMario

unread,
Jan 19, 2019, 6:28:29 PM1/19/19
to TiddlyWikiDev
Hi,
You are welcome!
-m

TonyM

unread,
Jan 19, 2019, 7:26:03 PM1/19/19
to TiddlyWikiDev
Adam,

It is exciting to hear we have someone with the interest and skills to contribute in this way. Keep in mind we have a lot of superusers here, like myself, who cant YET build such JS plugins, but we know how to do a lot of things using existing widgets, plugins and building macros. It is we who come across issues that  tiddlywiki either does not handle or does not handle well. It would be great if you could socialise these with us, perhaps in the other google group, because you can then make a real difference. Looking through the Git hub issues will also detail many of these gaps.

Presently for example I have to use formulas or calc plugin just to increment a value in a field (even just by 1) if such a solution could be made and placed in the core or a small plugin it would I believe help a lot of people.

I am sure I could generate a number of small, medium or large projects a budding developer could play with.

Another source is features available in HTML that requires java-script to work, they can be found all over the internet, some a really cool, but they need a developer to translate them into Widgets and macros within tiddlywikis framework.

Welcome, great to have you on the team.

Regards
Tony

admls

unread,
Jan 22, 2019, 8:35:52 PM1/22/19
to TiddlyWikiDev
@Tony,

Thanks for the welcome! I look forward to helping however I can. I wouldn't say that I'm very skilled, but I am learning fast.
The issue with the difficulty of doing even minimal number manipulation is definitely one I've come across, too. I'd personally like to go the route of investigating whether some kind of minimal and secure inline javascript is possible. If it is, I think it could open up that functionality and reduce bloat. The main project I've got my mind on at the moment is UI related. That's an area where progress may be difficult. In the little experimentation I've done with it, the tiddlywiki framework makes ui somewhat complicated.

Anyway, lots of ideas to explore!

@Mario,

I haven't tried the workflow for editing the core yet, but I did try it for a plugin and ran into a problem. I included the plugins necessary for saving tiddlers. And I included the plugin that I'm trying to develop (I had a few hasty tiddlers that I dropped in the plugin directory from another directory). I updated the config object as well. I got new tiddlers saving into the plugin directory. So that is working great. But I can't get the tiddlers I already had in there to show up in the wiki when it is running. Any ideas?



Best wishes,
Adam

TonyM

unread,
Jan 22, 2019, 11:56:43 PM1/22/19
to TiddlyWikiDev
Adam,

The control of TiddlyWikis UI is extensive, it provides a framework that can be co-opted into many forms as is exemplified by two examples 

And

This Kanban view ! Look familiar?

Make sure you click on the page button to which it refers.

Basically the UI can be taken as far as you want, a bit like using  a WordPress back-end but a fully customised front end.

But of course you may want such a drastically different front end that having to buy into TiddlyWikis UI may not seem worthwhile, but just consider what you get for your money, if you do?.

What I am saying is make sure you learn more before you make general assumptions.

Regards
Tony

admls

unread,
Jan 23, 2019, 4:14:31 AM1/23/19
to TiddlyWikiDev
Tony,

I'm fairly familiar with both of those plugins. I spent a bit of time trying to get the tiddlytouch plugin to work as a dependency for another experiment I was trying. Another really interesting one is BTC's Pan plugin. However, each of these plugins seems like it required a lot more code than if the same UI had been developed to work directly on the DOM. The tiddlywiki framework creates a layer of abstraction that is complicated to work through in terms of ui. It is optimized for connections between pieces of data and manipulation of those connections, but because those abstractions cut across the DOM in somewhat strange ways, doing ui work feels a little bit like doing a painting from six feet away with your brush glued to the end of a pool noodle. That's just the cost of preserving user-manipulable connections.

I'm not saying this because I can't be bothered to do some research. I'm saying this because I have been doing a fair bit of research and experimentation.

Best wishes,
Adam

TonyM

unread,
Jan 24, 2019, 9:49:03 PM1/24/19
to TiddlyWikiDev
Adam,

Understood, I did not know what you knew, I was only trying to ensure you knew why this layer was there. If you could find a way to open this up without compromising tiddlywikis operation, or operating somewhat independently but on top of the TiddlyWiki platform it would be interesting to see. The more Open TW can be the better, but it does have a long history that has built its value for the community. This means TiddlyWiki needs to be well understood before substantial changes are made, it is however fine to propose hooks to the core and plugins to demonstrate new behaviours, that is the beauty of open source community projects.

Abraham here is proposing an equally revolutionary addition of API's  https://abesamma.github.io/maarfapad-blog/index.html#Using%20Tiddlers%20to%20Build%20APIs

I have always considered the ability to use HTML Put and Get, Communicating with PHP and other server side services would also be a powerful addition although this breaks a desirable "single File model" the truth is as soon as we link to an external site or have a specific source of truth we have dependencies. Perhaps when not on line or single file the wiki just looses some services and degrades gracefully.

Regards
Tony
Reply all
Reply to author
Forward
0 new messages