GithubHelp home page GithubHelp logo

Comments (9)

tandrewnichols avatar tandrewnichols commented on July 30, 2024 1

Thanks for merging it so fast!

from gulp-angular-templatecache.

simonua avatar simonua commented on July 30, 2024

@tandrewnichols, this is interesting. What is your use case where you would want to supply a header and footer later that may not be known at the time you initiate the template cache process?

from gulp-angular-templatecache.

tandrewnichols avatar tandrewnichols commented on July 30, 2024

I'm using gulp-remember-cache to only rebuild templates that change and then using gulp-header and gulp-footer to add the wrapper.

from gulp-angular-templatecache.

simonua avatar simonua commented on July 30, 2024

@tandrewnichols, would a not-so-elegant but functional work-around such as this suffice? I wouldn't be opposed to updating documentation to cover this - respectfully - edge-case.

.pipe(ngtemplates({ header: ' ', footer: ' ' }))
instead of
.pipe(ngtemplates({ header: '', footer: '' }))

from gulp-angular-templatecache.

tandrewnichols avatar tandrewnichols commented on July 30, 2024

Um, I guess. Without intending any offense, it seems like a bug, even if it is an edge case, only because it's slightly unexpected behavior. It seems like, if you pass something as the header and footer, those things should be used as the header and footer. The default should be reserved for the case where header and footer aren't supplied. Furthermore, it's a pretty small change right? It's arguably an even smaller (amount of code-wise) change than updating the readme.

All that being said, it's your library, so make what decision you feel is best.

from gulp-angular-templatecache.

simonua avatar simonua commented on July 30, 2024

@tandrewnichols, no offense taken. It's always good to have varying approaches and opinions on such. I just recently became a collaborator on this project as I worked to remove the gulp-util grab bag package, so I am combing through issues and PRs and seeing what's still applicable. That said, I don't have strong opinions about any particular approach, so long as it's a) not a breaking change, b) covered properly by unit tests, and c) intuitive and/or well-documented.

Would you be so willing to submit a PR for this request, please?

from gulp-angular-templatecache.

tandrewnichols avatar tandrewnichols commented on July 30, 2024

I could have a crack at it. Not sure how quickly I'll get to it, but I'll make a TODO so I don't forget.

from gulp-angular-templatecache.

simonua avatar simonua commented on July 30, 2024

That sounds awesome, Andrew! Looking forward to collaborating on it with you.

from gulp-angular-templatecache.

simonua avatar simonua commented on July 30, 2024

@tandrewnichols, thanks again for taking charge of this. Appreciate the collaboration.

Simon

from gulp-angular-templatecache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.