[TW5] Guidance on naming convention for custom core tiddler

76 views
Skip to first unread message

Mal

unread,
Apr 26, 2016, 3:47:18 AM4/26/16
to TiddlyWiki
All,

I've created a "loadnew" command with similar functionality to the existing "load" command and I've named my new javascript tiddler: "$:/core/modules/commands/loadnew.js", for consistency with the existing commands.  However, upon reflection, I am wondering if this name is appropriate.  As far as I understand, the "$:/core/" prefix is for built-in core tiddlers, so I probably should not use this for a custom tiddler, particularly if I could be making it available for others to share.  Would it be more appropriate it use a prefix like "$:/mal/modules...", or "$:/_mal/modules..."?

It's probably not a big deal, but I would prefer to comply with the standard coding and naming conventions.

Any comments welcome.

Regards,

Mal

Hegart Dmishiv

unread,
Apr 26, 2016, 3:59:37 AM4/26/16
to TiddlyWiki
Hi Mal,

I tend to use $:/_ as the namespace prefix for my own system stuff. It is recommended in the Adopt A Titles Policy tiddler on the main tiddlywiki.com website.

Hegart.

PMario

unread,
Apr 26, 2016, 6:16:58 AM4/26/16
to TiddlyWiki
On Tuesday, April 26, 2016 at 9:47:18 AM UTC+2, Mal wrote:
... use a prefix like "$:/mal/modules...", or "$:/_mal/modules..."?

Yes, that's definitely the way to go. core is for official tw core only

unwritten best practice atm is:

plugins .. $:/plugins/<YourName>/<pluginName>
themes .. $:/themes/<YourName>/<themeName>

languages .. $:/languages/xx-YY .. eg: $:/languages/de-DE, ..de-AT, de-CH ...

your own system tiddlers .. $:/_anyName or $:/_mal/anyName if you prefer this.

The underline just takes care, that your own tiddlers are listed at the top of a "standard" list filter. So this is just for convenience.

If you create javascript /modules/ you should probably use the "plugin" convention


just some thoughts

-m


Mal

unread,
Apr 27, 2016, 3:54:41 AM4/27/16
to TiddlyWiki
Hegart and Mario,

Thanks for the helpful replies.

I think I will follow Mario's advice and put my new module into a plugin format.

Regards,

Mal
Reply all
Reply to author
Forward
0 new messages