AdamBrodzinski / meteor-generate

Meteor Generate - A Rails Inspired File Generator for Meteor
MIT License
65 stars 2 forks source link

template names not being generated #10

Closed gb96 closed 9 years ago

gb96 commented 9 years ago

When I generated posts page, ran meteor, then visited it in my browser I got the following error:

Couldn't find a template named "posts" or "posts". Are you sure you defined it?

Looking inside the generated files the problem is obvious, e.g. /client/pages/posts/index.html:

<template name='compName'>

<div class='comp-name'>
  <h1>Page: compName</h1>
  <p>Find me in client/pages/compName/index.html</p>
</div>

</template>

The index.html was generated from the version of meteor-generate I installed last week. I will try updating to the most recent version and regenerate everything and see if the error is still there.

gb96 commented 9 years ago

Deleted and regenerated, and template names were okay. So not sure what happened originally, but in any case consider it fixed :)

AdamBrodzinski commented 9 years ago

Oh weird! The pages module is pretty clunky... once the rest of the features get implemented I need to swing back and refactor it to use the new parsing/transforming modules! From the error above it almost seems like it copied over the templates but did not run the rest of the code to replace the variable names.