Well, I thought I had finally sorted out how how to structure a demo site 
for developing  a new widget plugin on tiddlywiki/node, but I have one more 
problem:
Making tiddlywiki see the external library I need.

I have a local TW/Node site like this:

TW-Demo
    +------------plugins
                      +--------myPlugin
                                      +------------myPlugin.js
                                            +
                                             |
                                            +-----------files
                                                            
+------myExtLibrary.js



How do I refer to myExtLIbrary.js within myPlugin.js? I tried the following:

var extLib = require("$:/plugins/myPlugin/files/myExtLibrary.js");

var extLib = require("$:/plugins/myPlugin/myExtLibrary.js");

var extLib = require("$:/myExtLibrary.js");

var extLib = require("$:files/myExtLibrary.js");

(I am clueless, obviously) 

Everytime I get a "Cannot find module" error. I would immensely grateful to 
anyone kind enough to explain to me the semantics of the expression in the 
require statement. How is the path computed? Is it relative to the 
tiddliwiki module? That seems to implied by the standard use of a statement 
like:

var  Widget = require("$:/core/modules/widgets/widget.js").widget;

But that can't be true, otherwise no local installation would ever use a 
plugin...
There's gotta be some magic somewhere that escapes me.


Cheers,
Stefano



-- 
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 [email protected].
To post to this group, send email to [email protected].
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/d50448e6-c03d-4051-9127-882db8c01d47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to