Skip to content

Commit

Permalink
升级版本,添加对fis的支持
Browse files Browse the repository at this point in the history
  • Loading branch information
yanhaijing committed Mar 6, 2015
1 parent c3e1d4b commit c2299b5
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#0.2.0 / 2015-3-6
- 支持fis

#0.1.0 / 2015-1-7
- 模板编译
- 渲染数据
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[template.js](https://github.com/yanhaijing/template.js) [![Build Status](https://travis-ci.org/yanhaijing/template.js.svg?branch=master)](https://travis-ci.org/yanhaijing/template.js) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/) [![release](https://img.shields.io/badge/release-v0.1.0-orange.svg)](https://github.com/yanhaijing/template.js/releases/tag/v0.1.0) [![spm package](http://spmjs.io/badge/template.js)](http://spmjs.io/package/template.js) [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/yanhaijing/template.js/blob/master/MIT-LICENSE.txt)
#[template.js](https://github.com/yanhaijing/template.js) [![Build Status](https://travis-ci.org/yanhaijing/template.js.svg?branch=master)](https://travis-ci.org/yanhaijing/template.js) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/) [![release](https://img.shields.io/badge/release-v0.2.0-orange.svg)](https://github.com/yanhaijing/template.js/releases/tag/v0.2.0) [![spm package](http://spmjs.io/badge/template.js)](http://spmjs.io/package/template.js) [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/yanhaijing/template.js/blob/master/MIT-LICENSE.txt)

template.js 一款javascript模板引擎,简单,好用。

Expand Down Expand Up @@ -83,6 +83,10 @@ template.js 一款javascript模板引擎,简单,好用。

[API](doc/api.md)

##自动化
###Fis
template.js从0.2.0开始支持[fis](http://fis.baidu.com/),详情请看[这里](https://github.com/yanhaijing/fis-parser-template)

##贡献指南

如果你想为template.js贡献代码,请采用fork + pull request 方式,并在发起pr前先将master上超前的代码rebase到自己的分支上。
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "template.js",
"main": "template.js",
"version": "0.1.0",
"version": "0.2.0",
"homepage": "https://github.com/yanhaijing/template.js",
"authors": [
"yanhaijing <yanhaijing@yeah.net>"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "template_js",
"description": "template.js 一款javascript模板引擎,简单,好用。",
"version": "0.1.0",
"version": "0.2.0",
"homepage": "https://github.com/yanhaijing/template.js",
"author": {
"name": "yanhaijing",
Expand Down
16 changes: 10 additions & 6 deletions template.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* template.js v0.1.0 (https://github.com/yanhaijing/template.js)
* template.js v0.2.0 (https://github.com/yanhaijing/template.js)
* Copyright 2015 yanhaijing. All Rights Reserved
* Licensed under MIT (https://github.com/yanhaijing/template.js/blob/master/MIT-LICENSE.txt)
*/
Expand Down Expand Up @@ -119,13 +119,17 @@
var html;
return html = fn.call(null, data, encodeHTML), o.compress ? html.replace(/\s/g, '') : html;
}

template.config = function (option) {
if (!isObj(option)) {
return false;
if (isObj(option)) {
o = extend(o, option);
}
o = extend(o, option);
return true;

return extend({}, o);
};
template.version = '0.1.0';

template.__compile = compile;
template.__encodeHTML = encodeHTML;
template.version = '0.2.0';
return template;
}));

0 comments on commit c2299b5

Please sign in to comment.