Stefano, I have a plugin at https://github.com/btheado/tw-ftlist which uses a structure I prefer. This one doesn't have any javascript code, but a javascript plugin can be structured like this as well (just that more will be needed).
TW listed as a dev-dependency in package.json and installed via npm rather than as a git checkout as you've done. That should simplify the directory structure. And in my example, #2 and #3 are in the same repository. If you choose that approach you are down to just 2 repositories. That's only a partial answer, but I hope it helps. Brian On Mon, Feb 4, 2019 at 10:56 AM stefano franchi <stefano.fran...@gmail.com> wrote: > Dear all: > > I am starting to write my first widget plugin + external library in TW5 > and I am not completely sure about the the correct / recommended / most > useful structure to give to the various pieces I need to orchestrate. > I am using the node + folder model, as recommended on the devs site. > > As I see it, there are 4 basic components: > > 1. TW5 itself > 2. My plugin code > 3. The demo/test site for the plugin > 4. The external js library code (which I maintain too) > > Here is what I did: > - I cloned the main TW5 repo and created a second git repo under > TW5/plugins/myName/myPluginName > - I cloned the external library repo under > TW5/plugins/myName/myPluginName/files > > So I have this structure, which I basically copied from the Railroad > plugin I am using as a blueprint (and which seems already a bit too > complex): > > TW5 (git repo) > +--------->bin > +--------->boot > +-- ..... > + -------->editions > | +--------->server > | +--------->tiddlywiki.info (updated > to include myPlugin) > +--------->plugins > +--------->tiddlywiki > +--------->stefano > +---------->myPlugin (git repo) > +----------->files > (git repo for external library) > | > > +------------>external_library.js > Questions: > > 1. Where would I put the demo/test site (which I also want to be under git > control)? Am i correct that any tiddlywik/node site I init from within the > TW5 directory above could be anywhere on disk and still have access to > myPlugin? > > 2. Mostly, I am not sure about the external library location. First, it > does not seem right to clone the entire external repo under files, which > presumably will contain also other local material (.css, tiddlywiki.files, > etc). > Perhaps the external library should be cloned under a subdir of files > and tiddlywiki.files structured accordingly, and tiddliwiki.files made to > point it to it? With demo/test site included it would look as follows: > > +--TW5 (git repo) > | +--------->bin > | +--------->boot > | +-- ..... > | + -------->editions > | | +--------->server > | | +--------->tiddlywiki.info > (updated to include myPlugin) > | +--------->plugins > | +--------->tiddlywiki > | +--------->stefano > | +---------->myPlugin (git repo) > | > +----------->files > | > +---------> file.css > | > +---------> tiddlywiki.files > | > +----------> external_library-folder (git repo) > | > | > | > +------------------>external-library.js > | > | > | > +-->Demo/test site (git repo) > > This structure makes logical sense to me but with four different git repos > to keep updated seems like a maintenance nightmare (well 3+1, since I am > not involved with TW5, although I would have to pull from every now and > then). > Any suggestions on possible simplifications? How do you guys do it? > > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWikiDev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to tiddlywikidev+unsubscr...@googlegroups.com. > To post to this group, send email to tiddlywikidev@googlegroups.com. > Visit this group at https://groups.google.com/group/tiddlywikidev. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tiddlywikidev/7618e06f-988b-4db8-8ed9-a53496d1ed54%40googlegroups.com > <https://groups.google.com/d/msgid/tiddlywikidev/7618e06f-988b-4db8-8ed9-a53496d1ed54%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikidev+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywikidev@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywikidev. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/CAO5X8Cy55WRTJ0H5EUzgN5%2B8BL%3DXD9L18e3ZOgK55LBwHqB7TQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.