miickel / gulp-angular-templatecache

Concatenates and registers AngularJS templates in the $templateCache.
MIT License
525 stars 103 forks source link

Continuous compilation of template file #85

Closed trevorhreed closed 6 years ago

trevorhreed commented 9 years ago

It would be fantastic if this plugin support functionality similar to gulp-continuous-concat. I would like to be able to update the template cache file piecemeal, so that compilation remains fast even when there are many, large templates to be compiled. Even if my template files are few and small, I would need this plugin to support this continuous concatenation functionality in order to be able to compile my JavaScript piecemeal without having to write the templates.js file out to disk.

miickel commented 9 years ago

sure, I would welcome any pull requests to support this.

trevorhreed commented 9 years ago

I finally got around to spending some time on this. However, the changes I ended up making are substantial enough that I'm uncertain if it would be better to try to integrate them into this repo or start a new repo entirely. Do you have any strong feelings one way or another?

It looks like @mjamin's solution might actually be sufficient for this project, though it would probably require a closure around the concat function passed in, in order to accomplish caching of files already sent down the pipe.