Code Monkey home page Code Monkey logo

hbs's People

Contributors

cap10morgan avatar okorz001 avatar simoraman avatar sunng87 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hbs's Issues

Templates do not reload automatically (includes suggestion)

The default behaviour of ConcurrentMapTemplateCache that this project uses by default is not to reload automatically. It would be a good idea to either enable reloading by default (as caching map is used) or allow the user to customize reloading on or off via function.

After browsing code of both this library and handlebars.java this is the code I used to enable the reloading on my program. It would be a good idea to introduce a function similar to set-template-path! to allow setting reloading on or off.

(.setReload (.getCache handlebars/*hbs*) true))

Readme contains incorrect information

On the readme.md there is mention of set-template-path! function

This function no longer exists:

Caused by: java.lang.RuntimeException: No such var: hbs/set-template-path!
	at clojure.lang.Util.runtimeException(Util.java:221)
	at clojure.lang.Compiler.resolveIn(Compiler.java:7138)
	at clojure.lang.Compiler.resolve(Compiler.java:7108)
	at clojure.lang.Compiler.analyzeSymbol(Compiler.java:7069)
	at clojure.lang.Compiler.analyze(Compiler.java:6648)

edit: it seems that most documentation is incorrect. defhelper does not work as documented, neither does reloading.

Please fix the documentation or at least clearly state that it's obsolete.

Checksum missing

I get this error from two separate servers so it doesn't seem to be networking issue.

$ lein ring server-headless

Retrieving hbs/hbs/0.9.1/hbs-0.9.1.pom from clojars
Could not transfer artifact hbs:hbs:pom:0.9.1 from/to clojars (https://clojars.org/repo/): Checksum validation failed, no checksums available from the repository
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.

It seems that checksum is missing. Older version can be installed just fine.

{{#parent-key}}{{child-key}}{{/parent-key}} doesn't work

I'm not sure if this is an hbs issue or a handlebars.java issue, but I would expect both of the templates in this gist to render to the exact same output, but they do not with the current version of hbs.

I tried the same construction with handlebars.js, and it worked there (as well as every other Mustache implementation I've used). Screenshot of the handlebars.js behavior is attached.

tryhandlebarsjs.com screenshot

Documentation missing for multiparameter helpers

I'm trying to use ifcontains and have no clue how it works. There is no documentation of any kind for helpers that have multiple parameters and I think there should be.

This is what I have tried based on guesses on how it could work (roles is a set)

{{#ifcontains roles :user}}user{{/ifcontains}}
{{#ifcontains roles item :user}}user{{/ifcontains}}
{{#ifcontains :user roles}}user{{/ifcontains}}   

All throw an error (a variation of below)

found: ':user', expected: '}}' <p>User? {{#ifcontains :user roles}}user{{/ifcontains}}

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.