Giter Site home page Giter Site logo

Other templating libraries about clndr HOT 9 CLOSED

kylestetz avatar kylestetz commented on May 5, 2024
Other templating libraries

from clndr.

Comments (9)

elidupuis avatar elidupuis commented on May 5, 2024

Having actually thought about this for a minute (it's late :) I see that you wouldn't be able to render anything of value without having a default template engine...

from clndr.

kylestetz avatar kylestetz commented on May 5, 2024

Awesome, I'm glad handlebars is working for you. You're right that the plugin doesn't make much sense without a templating engine, however underscore is only a conditional dependency.

When you supply your own render function to your clndr instance, you are telling clndr "don't worry about underscore, I've got my own templating engine". In this case, clndr doesn't look for underscore and you don't need to include it in your project. If you don't supply a templating engine, however, it's going to look for underscore and give you an error if it's not there.

If you have any other suggestions as to how this could work, definitely let me know!

from clndr.

elidupuis avatar elidupuis commented on May 5, 2024

My main concern is with Underscore being included in the Bower dependencies.

I installed CLNDR via Bower and I'm not using Underscore, but it still gets installed. Admittedly, not the biggest issue—I just like things to be tidy ;) IF it didn't get installed by default, and I wasn't using a custom render function, I would just get a warning about Underscore not being found. I don't think it's too big of leap to run bower install underscore after seeing that message, but I'll leave it up to you!

from clndr.

kylestetz avatar kylestetz commented on May 5, 2024

Oh! Totally misunderstood. I've never used bower so I didn't know this was a thing. I looked around for 'conditional dependencies' in bower and all I could find was this bower feature request which didn't lead anywhere. Do you know of any other projects where this is an issue?

from clndr.

elidupuis avatar elidupuis commented on May 5, 2024

Not sure where else this might be happening...I'm no Bower expert :)

Honestly, I'd just remove Underscore from the bower.json file. If someone is using Bower it's easy enough to load Underscore for the default behavior. This is the strength of Bower.

from clndr.

elidupuis avatar elidupuis commented on May 5, 2024

This is what I'm thinking: #68

from clndr.

elidupuis avatar elidupuis commented on May 5, 2024

I suppose you'd remove it from clndr.jquery.json as well...

from clndr.

kylestetz avatar kylestetz commented on May 5, 2024

Thanks, I'm a little worried this leans too far in the direction of your use case... this change will cause an error (underscore missing) to anyone who has used clndr with bower that hasn't changed the templating engine. Since I haven't heard very much chatter about alternative templating engines, I think this is most people and it will be a pretty disruptive change.

I'm sensitive to this issue since many clndr users are new to web development and we don't want to make their lives any harder. I'd rather find a solution that involves specifying to bower that you want to ignore underscore as a dependency.

A separate bower configuration file that doesn't have the underscore dependency would be nice, so you would run bower install clndr-no-underscore or some such thing.

I really appreciate your input and I hope you understand where I'm coming from!

from clndr.

elidupuis avatar elidupuis commented on May 5, 2024

Totally understand where you're coming from .

If you bump the release/version properly it shouldn't affect current users. I'd say it's still possible to do it at some point in the future—just document it in your changelog.

Either way, thanks for a solid plugin. Take care!

from clndr.

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.