I just updated my angular-phonecat-brunch tutorial project to the latest version of jade-angularjs-brunch. While it was a bit difficult to figure out the correct settings for config.coffee and the templateUrl incantations, I managed to get it working, mostly according to this project's README (but see Aside below).
However, in order to make the Karma unit tests to work, I had to not only inject the 'app.templates' module, but also to specify 'public/js/*.templates.js' in the karma.conf.js file. To me, this last step is a kludge, because it requires that I run brunch build first in order to create the app.templates.js file--otherwise the unit tests fail. There ought to be some way of injecting the partials into the tests directly from the app tree.
_ Aside: It's confusing that the "Sample of settings" section is marked "DEPRECATED" since its recommendations appear to be valid and still working. It would also be helpful if there were further explanations of the settings. For example, is the paths.jadeCompileTrigger setting necessary or not? Angular-brunch-seed, for one, doesn't use it. The default of js/dontUseMe is poorly named and angular-brunch-seed calls it (under templates.joinTo) a "dirty hack". I don't know the story behind it but I chose to specify it as .compile-jade (as recommended in your README) which is almost self-explanatory. Also, is the jade_angular.locals context required or just nice-to-have (and if so, why)?
I just updated my angular-phonecat-brunch tutorial project to the latest version of jade-angularjs-brunch. While it was a bit difficult to figure out the correct settings for
config.coffee
and thetemplateUrl
incantations, I managed to get it working, mostly according to this project's README (but see Aside below).However, in order to make the Karma unit tests to work, I had to not only inject the 'app.templates' module, but also to specify
'public/js/*.templates.js'
in thekarma.conf.js
file. To me, this last step is a kludge, because it requires that I runbrunch build
first in order to create theapp.templates.js
file--otherwise the unit tests fail. There ought to be some way of injecting the partials into the tests directly from theapp
tree._ Aside: It's confusing that the "Sample of settings" section is marked "DEPRECATED" since its recommendations appear to be valid and still working. It would also be helpful if there were further explanations of the settings. For example, is the
paths.jadeCompileTrigger
setting necessary or not? Angular-brunch-seed, for one, doesn't use it. The default ofjs/dontUseMe
is poorly named and angular-brunch-seed calls it (undertemplates.joinTo
) a "dirty hack". I don't know the story behind it but I chose to specify it as.compile-jade
(as recommended in your README) which is almost self-explanatory. Also, is thejade_angular.locals
context required or just nice-to-have (and if so, why)?