Hi,
I've written two js macros, and part of the code is the same.
So I've put this part in a function (say : myUtilFunction) in another tiddler (say : Utils.js, application/javascript, and module-type : library). At the end : exports.myUtilFunction = myUtilFunction;
Now I'm trying to make this function available int the two macros.
So in the twos macros, before "
exports.name = ...", I have :
var myUtilFunction = require("Utils.js").myUtilFunction;
It doesn't work, the error message reads : myUtilFunction is not a function.
I've already used this way in writing a widget and it worked. Is there a pb with macros ?
Any help welcome !
Regards
FrD