ericclemmons / grunt-angular-templates

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

options.source usage? #62

Closed aabes closed 10 years ago

aabes commented 10 years ago

I've been trying to use the source callback as a means to handle haml templates by wrapping the haml grunt task..... but w/o much success.

Any chance you can post an example of using the source callback?

(As a side note, I ended up just including a haml step in the grunt build before the ngtemplates, and configuring ngtemplates a source that picks them both:

  src: ["app/templates/**/*.html", 'generated/app/templates/**/*.html'],

)

ericclemmons commented 10 years ago

Your last suggestion would be my preference: pre-processing .haml into .html before running grunt:ngtemplates.

However, for the first suggestion, to transform the source, you need to be running something synchronous. Check out my custom_source test.

I'd be curious to see your ngtemplates config, too!

ericclemmons commented 10 years ago

I'm cleaning up issues today, so let me know if this is something I can/can't help with!

ericclemmons commented 10 years ago

Let me know if there's actually something here to be done. Regarding the source, I'd recommend "staging" the HAML as HTML in another folder, and having ngtemplates work on that.

Let me know!