Skip to content

Commit

Permalink
⬆️ Update jhtmls@1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
zswang committed May 3, 2017
1 parent 283d47a commit 95ac9af
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 22 deletions.
2 changes: 1 addition & 1 deletion bower.json
@@ -1,7 +1,7 @@
{
"name": "penjs",
"description": "Mobile-web small development framework.",
"version": "0.1.8",
"version": "0.1.9",
"author": {
"name": "zswang",
"url": "http://weibo.com/zswang"
Expand Down
8 changes: 4 additions & 4 deletions example/todomvc/ejs.html
Expand Up @@ -67,17 +67,17 @@ <h1>todos</h1>
}).length;
%>
<span class="todo-count">
<strong><%= remaining %></strong> left <%= remaining === 1 ? 'item' : 'items' %>
</span>
<strong><%= remaining %></strong> left <%= remaining === 1 ? 'item' : 'items' %>
</span>
<ul class="filters">
<li><a href="#/all" :class="{selected: visibility == 'all'}">All</a></li>
<li><a href="#/active" :class="{selected: visibility == 'active'}">Active</a></li>
<li><a href="#/completed" :class="{selected: visibility == 'completed'}">Completed</a></li>
</ul>
<% if (todos.length > remaining) { %>
<button class="clear-completed" @click="removeCompleted()">
Clear completed
</button>
Clear completed
</button>
<% } %>
</footer>
</script>
Expand Down
8 changes: 4 additions & 4 deletions example/todomvc/index.html
Expand Up @@ -61,17 +61,17 @@ <h1>todos</h1>
return todo.completed;
}).length;
<span class="todo-count">
<strong>#{remaining}</strong> left #{remaining === 1 ? 'item' : 'items'}
</span>
<strong>#{remaining}</strong> left #{remaining === 1 ? 'item' : 'items'}
</span>
<ul class="filters">
<li><a href="#/all" :class="{selected: visibility == 'all'}">All</a></li>
<li><a href="#/active" :class="{selected: visibility == 'active'}">Active</a></li>
<li><a href="#/completed" :class="{selected: visibility == 'completed'}">Completed</a></li>
</ul>
if (todos.length > remaining) {
<button class="clear-completed" @click="removeCompleted()">
Clear completed
</button>
Clear completed
</button>
}
</footer>
</script>
Expand Down
4 changes: 2 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "penjs",
"version": "0.1.8",
"version": "0.1.9",
"description": "Mobile-web small development framework.",
"main": "penjs.js",
"scripts": {
Expand Down Expand Up @@ -41,7 +41,7 @@
"gulp-uglify": "^2.1.2",
"h5ajax": "^0.0.5",
"h5tap": "^0.0.4",
"jhtmls": "^1.1.11",
"jhtmls": "^1.2.2",
"jnodes": "^0.4.17",
"mockjs": "^1.0.1-beta3",
"jsdom": "^9.12.0",
Expand Down
15 changes: 5 additions & 10 deletions penjs.js
Expand Up @@ -5,8 +5,8 @@
* Mobile-web small development framework.
* @author
* zswang (http://weibo.com/zswang)
* @version 0.1.8
* @date 2017-05-01
* @version 0.1.9
* @date 2017-05-03
* @license MIT
*/
/*<function name="parser_void_elements">*/
Expand Down Expand Up @@ -1732,7 +1732,7 @@ function adapter_jhtmls(node, bindObjectName) {
lines.unshift('with(this){');
lines.push('}');
return new Function(
'_output_', '_encode_', 'helper', 'jhtmls', 'require',
'_output_', '_encode_', 'helper',
lines.join('\n')
);
}
Expand Down Expand Up @@ -1813,19 +1813,14 @@ function adapter_jhtmls(node, bindObjectName) {
* @param {Object} h 辅助对象 helper
*/
var format = function (d, h) {
var _require;
/* istanbul ignore else */
if (typeof require === 'function') {
_require = require;
}
// h = h || fn;
var output = [];
if (typeof h === 'undefined') {
h = function (d) {
fn.call(d, output, encodeHTML, h, exports, _require);
fn.call(d, output, encodeHTML, h);
};
}
fn.call(d, output, encodeHTML, h, exports, _require);
fn.call(d, output, encodeHTML, h);
return output.join('');
};
if (arguments.length <= 1) { // 无渲染数据
Expand Down
2 changes: 1 addition & 1 deletion penjs.min.js

Large diffs are not rendered by default.

0 comments on commit 95ac9af

Please sign in to comment.