Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit 65 (v1.0.0-beta.65 - Beta Candidate)
BREAKING CHANGES AND IMPROVEMENTS - The global namespace when JsRender is loaded without jQuery is now window.jsrender. (Previously it was window.jsviews). So when using JsRender without jQuery, you can write: var $ = jsrender; - and use the $ var it in the same way you would use the global $ when JsRender is loaded with jQuery: e.g. $.templates(...) or $.views.helpers(...) etc. - AMD support has been improved and simplified. All AMD modules, including JsRender, with or without jQuery, now return the jQuery object (if loaded) or the analogous JsViews object. - Node.js support and integration has been improved - along with improved CommonJS support, and Browserify integration. The file system APIs now use the syntax tmpl="./file/path.html". The Node.js version of jsrender.js is available as a separate file (available at //jsviews.com/download/jsrender-node.js). The Node.js version of JsRender provides the complete set of JsRender APIs and features, together with integration with NodeJS view-engines such as Express and Hapi, APIs for loading templates from the file system, etc. The file system APIs now use the syntax tmpl="./file/path.html". It also includes a built-in Browserify transform (see "Browserify Support: below). (Note: JsRender and JsViews will soon be published to NPM). - The behavior when loading multiple instances of JsRender or JsViews files has been changed: When loading a new instance, the previous instance $.views, $.templates, etc. is no longer overwritten. So a component using JsRender or JsViews will not, when loaded, cause another already loaded component also using JsViews/JsRender to fail (except for collisions arising in the unlikely case where both happen to use the same template/converter/helper name). As part of this modified behavior, the noConflict support for JsRender had been removed. NEW FEATURES - observeAll() for cyclic objects is now supported for the vast majority of cases. See #304 - Improved support for data-linking to data- attributes: <elem data-link="data-foo{:expr}" ...>. After data-linking, the value of the data-foo attribute will be expr.toString(), but $.data(element, "foo") and $(element).data("foo") will actually return the value of expr, even if of type object. See #306 - Browserify Support: JsRender on Node.js provides a built-in Browserify transform - jsrender.tmplify, for including compiled JsRender templates from the server, as part of the client javascript bundle generated by Browserify. Usage example: var $jsr = require('jsrender'); browserify(...) ... .transform($jsr.tmplify) ... See also http://www.jsviews.com/test/unit-tests-browserify.html - Initial work for deployment to Bower and NPM. See #254 BorisMoore/jsrender#225 Bug Fixes: - BorisMoore/jsrender#263 BorisMoore/jsrender#264 Caching of template on script elements. (Unit tests added) - #304 ObserveAll on cyclic objects - #306 'data-xxxx' attribute using data-link - #307 #312
- Loading branch information