cssmagic / underscore-template

More APIs for Underscore's template engine.
10 stars 3 forks source link

需要移除对 underscore.string 的依赖 #9

Closed cssmagic closed 9 years ago

cssmagic commented 9 years ago

作为一个独立项目,外部依赖当然越小越好。

引入 underscore.string 是为了处理字符串,用的最多的是它的 .trim().include() API。这两者可以很容易地自己实现。

为了处理 Jedi 在 <script> 标签内加的一层注释,又用到了 .startsWith().endsWith()。自己实现也不难。希望 Jedi 2.0 出来以后可以完全去掉内部的 _stripCommentTag() 方法。

zpbx commented 9 years ago

PR #12 已初步完成。