ericclemmons / grunt-angular-templates

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

path adding a ./ prefix #66

Closed solomon23 closed 10 years ago

solomon23 commented 10 years ago

Looks like the new version is appending a "./" to the paths i generate now. I've moved back to the previous version and it went away. Tried adding a prefix but it didn't seem to help:

ngtemplates: myApp: cwd: "./client" src: "./views/*/.html" dest:"./public/js/templates.js" prefix: ""

ericclemmons commented 10 years ago

The path I'm assuming should be views/my/template.html, correct?

solomon23 commented 10 years ago

Sorry, yes.

Expecting: $templateCache.put('views/blog.html',

actual: $templateCache.put('./views/blog.html',

ericclemmons commented 10 years ago

@solomon23 Feeling better, working on this now.

ericclemmons commented 10 years ago

Oh, I'm a dummy. I should've at least said that removing the ./ prefix from the src should resolve the issue.

cwd is used for pathing, and the src ends up sticking around. The examples I use in this project's Gruntfile.js keep the URLs relative for both cwd (defaults to Gruntfile location) and src (defaults to cwd).

ericclemmons commented 10 years ago

@solomon23 Let me know. I'd prefer solving this on the config side, as now I'm afraid to change it & have to do another breaking version bump. It should be fixable with only a few keystrokes in your config!

solomon23 commented 10 years ago

no problem, your suggestion fixed me up. thanks for your work on this - it's really useful.