In the thread, Package Only Using Mediator Pattern , I mention beginning to try to redo the Try Meteor tutorial as a package. Yesterday, I committed a little project to GitHub : pkgd-todos. I got as far as the second step in the tutorial and hit a problem.
To get it to work, instead of adding the new code directly in the package
directory, I had to first do so in a sibling directory I called modules
. It works fine there, but if i move the code from modules/todos-pkg/client/todos-pkg.*
to packages/todos-pkg/client/todos-pkg.html
I get the error:
Uncaught TypeError: Cannot read property 'helpers' of undefined
Prior to that error I hit the complaint :
Uncaught ReferenceError: Template is not defined
However, I fixed that in my package.js
file, easily enough, with :
api.use('templating');
Having got past that, I now see no way at all to make my todos
template visible.
So, my first questions are conceptual – Can a package export a template to the embedding application? Or, from the other point of view, can an application “see” templates in a package? What further setting do I need in my packages.js file, to make it work?