Skip to content

Commit

Permalink
Commit 65 (v1.0.0-beta.65 - Beta Candidate)
Browse files Browse the repository at this point in the history
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 BorisMoore/jsviews#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 BorisMoore/jsviews#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
  BorisMoore/jsviews#254
  BorisMoore/jsrender#225

Bug Fixes:

- BorisMoore/jsrender#263
  BorisMoore/jsrender#264
  Caching of template on script elements. (Unit tests
  added)

- BorisMoore/jsviews#304
  ObserveAll on cyclic objects

- BorisMoore/jsviews#306
  'data-xxxx' attribute using data-link

- BorisMoore/jsviews#307
  BorisMoore/jsviews#312
  • Loading branch information
BorisMoore committed Aug 16, 2015
1 parent 11e6325 commit 1793620
Show file tree
Hide file tree
Showing 140 changed files with 17,960 additions and 13,945 deletions.
21 changes: 2 additions & 19 deletions .gitattributes
@@ -1,22 +1,5 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
# JS files must always use LF for tools to work
*.js eol=lf
12 changes: 5 additions & 7 deletions .gitignore
@@ -1,8 +1,6 @@
################################################################################
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
################################################################################

*.config
Scripts/_references.js
**/.*
node_modules
/resources/previousImages
bower_components
test/browserify/bundles/*.js
*.config
Scripts
1 change: 0 additions & 1 deletion CNAME

This file was deleted.

0 comments on commit 1793620

Please sign in to comment.