Git Product home page Git Product logo

kruntch.js's Introduction

#kruntch.js

A Simple, Efficient and Non-Invasive Templating Engine for JavaScript.

#Curent Stable Version

1.2.0

#Change Log

1.2.0

  • Fixed "empty" template processing for collections with 0 elements.
  • Added "Root" special view object reference when binding new view objects.
  • Added "Parents" special view object collection when binding new view objects.
  • Added "Family" special view object when binding new view objects.
  • Added "" template processing construct.

1.1.1

  • Added "empty" construct for collections which allows template authors to specify a sub-template to be applied in the event that the collection is empty.
  • Fixed a minor issue in the collection accesing function that prevented [#] from working under certain circumstances.
  • Fixed issue with the "to" parameter and TemplateIO.Write... must check for undefined or null before writing!
  • Implemented "set" (set innerHTML) for TemplateIO.Write rather than "append"... judgement call but probably closer to what most situations would require/expect.
  • Added minorHTMLDecode function to perform a limited HTML decode of all "code" values ({}, {{}}, where and condition clause values). This helps to support template containers (HTML5 template tag) that automatically encode textual contents.

1.1.0

  • Major re-write removing all DOM (document, window, etc.) constructs in an effort to make kruntch totally portable to node.js.
  • Template parsing was most affected as 1.0.0 was heavily relying on DOM to parse the template text into traversable nodes.
  • Token parsing (ala George Vaccaro) is now utilized to split the template text into Kruntch.js template contstrutcs and text.
  • For this Kruntch.js is now totally functional in node.js! The node.js module is: kruntch.node-1.1.0.js.

1.0.0

  • Initial version

#Browser compatibility

IE 7+, FF, Chrome, Mobile Safari, Mobile Chrome

#Contribute!

Current contributer list:

  • David Vaccaro
  • George Vaccaro

#Licence

See LICENSE-INFO.txt

kruntch.js's People

Contributors

davidvaccaro avatar

Stargazers

 avatar Ahmad Ali avatar Alexander Khlebnikov avatar Andreas McDermott avatar Pedro Rogério avatar craftsmantek avatar

Watchers

 avatar  avatar

kruntch.js's Issues

Need access to .Root object from a template

We're dealing with some deeply nested objects, and need to refer back to the root object from within a deeply nested block, but the only way seems to be this:
Parent.Parent.Parent.Parent.some_property

I would like to know where in the code I can add a new property called:
.Root.some_property

Any idea? Could you send me an email at:
jaysmith024 at gmail

Thanks David.
Jay

Parent. scope broken

It appears that the reference to the .Parent scope from a child (in a for/with loop) is broken. It gives an error "value is undefined". The work-around is to duplicate the relevant parent values in each json-child item.

Is there a fix?

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.