diff --git a/package.json b/package.json index 3dfed1b..fb9edad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blear.classes.template", - "version": "1.0.5", + "version": "1.0.6", "description": "指令类型模板引擎", "scripts": { "live": "browser-sync start --config bs-config.js", diff --git a/src/index.js b/src/index.js index fbf3f81..afe49e0 100644 --- a/src/index.js +++ b/src/index.js @@ -9,16 +9,16 @@ 'use strict'; -var Lexer = require('blear.shims.lexer'); -var Events = require('blear.classes.events'); -var object = require('blear.utils.object'); -var array = require('blear.utils.array'); +var Lexer = require('blear.shims.lexer'); +var Events = require('blear.classes.events'); +var object = require('blear.utils.object'); +var array = require('blear.utils.array'); var collection = require('blear.utils.collection'); -var number = require('blear.utils.number'); -var string = require('blear.utils.string'); -var json = require('blear.utils.json'); -var fun = require('blear.utils.function'); -var random = require('blear.utils.random'); +var number = require('blear.utils.number'); +var string = require('blear.utils.string'); +var json = require('blear.utils.json'); +var fun = require('blear.utils.function'); +var random = require('blear.utils.random'); var staticDirectives = {}; @@ -916,6 +916,15 @@ Template.statement = function (name, install) { }; +/** + * 字符化 + * @param value + */ +Template.textify = function (value) { + return textify(value); +}; + + Template.directive('if', 10000, require('./_directives/if.js')); Template.directive('show', 1000, require('./_directives/show.js')); Template.directive('class', 100, require('./_directives/class.js'));