ericclemmons / grunt-angular-templates

Grunt build task to concatenate & pre-load your AngularJS templates
MIT License
710 stars 107 forks source link

Warning with watch #65

Closed mkazlauskas closed 10 years ago

mkazlauskas commented 10 years ago

I am using this with grunt-contrib-watch and I am getting this warning:

Running "ngtemplates:app" (ngtemplates) task Warning: Object function (expected) { return _this.evaluateAssertion(assertProvider, true, this, expected); } has no method 'map'

The proceeding grunt tasks are not being run, so if I stop the watcher and run grunt ngtemplates manually it will work just fine.

Any idea if this is a bug or I am doing something wrong?

ericclemmons commented 10 years ago

Can you post up your ngtemplates config and concat config, if you're using it?

mkazlauskas commented 10 years ago

No, not using the concat, but I'm using uglify. Here's the whole config: https://github.com/l33tas/mazo-seed/blob/master/Gruntfile.coffee

ericclemmons commented 10 years ago

Ok, this is odd. You're not doing anything out of the ordinary regarding ngtemplates. Truth be told, that error looks like a unit-testing error, possibly from expectThat.

So you're saying that if you drop ngtemplates from the build:js:client alias, grunt watch and everything continues to work fine?

Try updating the plugin & running it with grunt watch --debug --stack and see if that'l help me out...

mkazlauskas commented 10 years ago

Thanks for looking to it. It's working fine now. Honestly I don't know what I did to fix it. I'm closing the issue.

zerdos commented 10 years ago

Guys, to reproduce this bug, insert this lines to a html file: <input onFooBarLongWordTakesLongerToProcess() />

So ngtemplates will find out that something wrong in your templates, but if you have a longWordInThisFormat - it slows down significantly - takes hours to find out that something wrong in your template.