{"id":17584718,"url":"https://github.com/cssmagic/underscore-template","last_synced_at":"2025-04-28T16:23:21.254Z","repository":{"id":21611154,"uuid":"24931460","full_name":"cssmagic/underscore-template","owner":"cssmagic","description":"More APIs for Underscore's template engine.","archived":false,"fork":false,"pushed_at":"2015-12-24T03:24:25.000Z","size":41,"stargazers_count":10,"open_issues_count":9,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T09:57:45.925Z","etag":null,"topics":["api","cache","render","template","template-engine","underscore","underscore-template-engine"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cssmagic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-08T08:30:44.000Z","updated_at":"2023-06-03T13:22:34.000Z","dependencies_parsed_at":"2022-08-21T19:01:01.371Z","dependency_job_id":null,"html_url":"https://github.com/cssmagic/underscore-template","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssmagic%2Funderscore-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssmagic%2Funderscore-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssmagic%2Funderscore-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssmagic%2Funderscore-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cssmagic","download_url":"https://codeload.github.com/cssmagic/underscore-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251343295,"owners_count":21574336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cache","render","template","template-engine","underscore","underscore-template-engine"],"created_at":"2024-10-22T02:07:52.573Z","updated_at":"2025-04-28T16:23:21.239Z","avatar_url":"https://github.com/cssmagic.png","language":"JavaScript","readme":"# Underscore-template\n\n\u003e More APIs for Underscore's template engine - template fetching, rendering and caching.\n\n## 简介\n\n著名的 JavaScript 工具库 Underscore 内置了一个小巧而完备的前端模板引擎，而 Underscore-template 对它进行了封装和增强，将它更好地融入了开发流程：\n\n* 提供简洁易用的 API，使用者不需要操心底层细节\n* 为各个模板命名，纳入统一的模板库，以便管理和调用\n* 可在 JS 中编写模板，也可以在 HTML 中编写模板；且两种方案可平滑切换\n* 通过两级缓存来优化性能，避免模板的重复获取和重复编译\n\n## 兼容性\n\n依赖以下类库：\n\n* Underscore\n\n支持以下浏览器：\n\n* Chrome / Firefox / Safari 等现代浏览器\n* IE 6+\n\n## 安装\n\n0. 通过 Bower 安装：\n\n\t```sh\n\t$ bower install underscore-template\n\t```\n\n0. 在页面中加载 Underscore-template 的脚本文件及必要的依赖：\n\n\t```html\n\t\u003cscript src=\"bower_components/underscore/underscore.js\"\u003e\u003c/script\u003e\n\t\u003cscript src=\"bower_components/underscore-template/src/underscore-template.js\"\u003e\u003c/script\u003e\n\t```\n\n## API 文档\n\n* Underscore-template 提供了简洁易用的 API，[详见此文档](https://github.com/cssmagic/underscore-template/issues/5)。\n* 此外，建议阅读 [Wiki](https://github.com/cssmagic/underscore-template/wiki) 来获取更多信息。\n\n## 单元测试\n\n0. 把本项目的代码 fork 并 clone 到本地。\n0. 在本项目的根目录运行 `bower install`，安装必要的依赖。\n0. 在浏览器中打开 `test/test.html` 即可运行单元测试。\n\n## 谁在用？\n\n移动 UI 框架 [CMUI](https://github.com/CMUI/CMUI) 采用 Underscore-template 作为轻量的前端模板解决方案，因此所有 CMUI 用户都在使用它：\n\n* [百姓网 - 手机版](http://m.baixing.com/)\n* [薇姿官方电子商城 - 手机版](http://m.vichy.com.cn/)\n* [优e网 - 手机版](http://m.uemall.com/)\n\n***\n\n## License\n\n[MIT License](http://www.opensource.org/licenses/mit-license.php)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssmagic%2Funderscore-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcssmagic%2Funderscore-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssmagic%2Funderscore-template/lists"}