-
Notifications
You must be signed in to change notification settings - Fork 157
Compilation broken in subdirectories (coffee, jst, handlebars, ...) #78
Comments
In fact adding to the above: |
Regarding the Regarding the templates this is okey for the default behaviour since yeoman creates all the templates in the |
@revathskumar , I think some of of us (maybe many of us?) like to organize our templates following a logic folder structure rather than have them all mixed up in the same level. Something like the following is quite common in my workflow: At least I think it might be worthwhile to warn users about the default behaviour being that templates are going to be compiled only if they are on the first level of the templates directory, and possibly document how to change that in the Gruntfile.js in case they want to have a more complex folder structure to store their templates |
When it comes down to patterns for directory organization, I favor us opting for the simplest common-denominator and documenting ways to customize this as there will almost certainly be people that want to change it. As the first of your earlier points was addressed already, I recommend we do:
|
+1 for adding support for sub directories. |
They already are warned in the Gruntfile: https://github.com/yeoman/generator-backbone/blob/master/app/templates/Gruntfile.js#L9-L13 But all the |
@eddiemonge i agree. |
+1 to support nested templates (at least one extra level)
@revathskumar Even though backbone generator and yo generate files in top level /templates, there might be other nested files. Why leave this out when the probability of it breaking for users is quite high? (just happened to me and got here :/) Like @eddiemonge mentioned, I think we should make it consistent across generators by going with PS: Any performance benchmarks available? |
Hi there,
I noticed quite an annoying misconfiguration in Gruntfile.js.
At least in the following tasks:
We are only specifying one level in the files configuration:
*.hbs, *.coffee
where it should be either**/*.hbs
or{,*/}*.hbs
(the same goes for the other file types, coffee, etc ...)I think the current behaviour is quite confusing for new users who will for example put their models in scripts/models/ only to find that they are not compiled. They might as well think that the generator is broken without even trying to find why it is not compiling.
Yeoman/webapp generator has it right, I think backbone generator should follow the same philosophy instead of asking users to dig into the gruntfile to see why their files are not being compiled
The text was updated successfully, but these errors were encountered: