Using Jade templates in a package

I've found this to be a real headache. In package.js for templates to work you need to add

Package.onUse(function(api) {  
  ], "client");
  api.addFiles('chatBubble.jade', 'client')

Notice the version lock on jade. You can get the most recent version number from the GitHub page.

There's an issue reported here but it looks like they're not fixing it, what a pity.

For more information on how to use templating in packages see Derry Birkett's blog.

Krister Viirsaar

Read more posts by this author.

Subscribe to Krister's coding adventures

Get the latest posts delivered right to your inbox.

or subscribe via RSS with Feedly!