{"id":19440259,"url":"https://github.com/firede/mars-modules","last_synced_at":"2026-06-08T23:01:28.084Z","repository":{"id":3107028,"uuid":"4133122","full_name":"firede/mars-modules","owner":"firede","description":"Mars（点点JavaScript模板引擎）官方托管模块库","archived":false,"fork":false,"pushed_at":"2012-07-21T13:07:53.000Z","size":198,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-22T03:02:24.798Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.diandian.com","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"graphite-project/graphite-web","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/firede.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":"2012-04-25T05:10:03.000Z","updated_at":"2014-11-03T02:43:55.000Z","dependencies_parsed_at":"2022-09-21T09:20:55.043Z","dependency_job_id":null,"html_url":"https://github.com/firede/mars-modules","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/firede/mars-modules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firede%2Fmars-modules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firede%2Fmars-modules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firede%2Fmars-modules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firede%2Fmars-modules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firede","download_url":"https://codeload.github.com/firede/mars-modules/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firede%2Fmars-modules/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34083848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-10T15:28:34.139Z","updated_at":"2026-06-08T23:01:28.036Z","avatar_url":"https://github.com/firede.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Mars Modules\n======================\n\nMars的模块系统遵循CommonJS规范，所以在Mars支持的权限范围内，有很多CommonJS模块可以直接在Mars下使用（比如部分NodeJS模块、RequireJS模块）。\n\nD-Lab团队托管了一些开源模块，以便大家调用。\n\n如果你有优秀的模块想要与大家分享，可以[告诉我们](https://github.com/d-lab/mars-modules/issues)，我们会将质量及适应程度较高的模块托管在官方模块仓库里。\n\n目录结构\n----------------\n\n* __repo__: 模块仓库\n    * __underscore__\n    ( [主页](http://documentcloud.github.com/underscore/) ):\n    Underscore.js是一个实用的JavaScript工具框架，提供了与Prototype.js（或Ruby）相似的功能编程支持，但没有对 JavaScript 内置的对象进行扩展。其中包含一个简单的模板引擎。\n    * __underscore.string__\n    ( [主页](http://epeli.github.com/underscore.string/) ):\n    Underscore.string为Javascript提供完整的字符串操作。是Underscore.js的扩展，亦可单独使用。\n    * __moment__\n    ( [主页](http://momentjs.com/) ):\n    Moment.js是一个简单易用的轻量级JavaScript日期处理类库，提供了日期格式化、日期解析等功能，支持多种语言。\n    * __dot__\n    ( [主页](http://olado.github.com/doT/) ):\n    doT.js是一个高性能JavaScript模板引擎。\n    * __mustache__\n    ( [主页](https://github.com/janl/mustache.js) ):\n    Mustache是一个少量逻辑的模板语言。\n    * __handlebars__\n    ( [主页](http://handlebarsjs.com/) | [Mars版](https://github.com/firede/handlebars.js) ):\n    Handlebars.js是一个兼容Mustache，但功能更强大的模板引擎。\n    * __haml__\n    ( [主页](https://github.com/visionmedia/haml.js) | [Mars版](https://github.com/firede/haml.js) ):\n    HAML是一个用来描述任何XHTML文档的标记语言。干净简单的模板引擎，这里是他的JS实现。\n    * __hogan__\n    ( [主页](http://twitter.github.com/hogan.js/) ):\n    Hogan.js是来自Twitter的JavaScript模板引擎。\n    * __htmlparser__\n    ( [主页](https://github.com/tautologistics/node-htmlparser) ):\n    node-htmlparser是NodeJS下的HTML解析器。\n    * __cssom__\n    ( [主页](https://github.com/NV/CSSOM) ):\n    CSSOM是一个用原生JavaScript写的CSS解析器，它部分实现了CSS对象模型。\n    * __xmlbuilder__\n    ( [主页](https://github.com/oozcitak/xmlbuilder-js) ):\n    一个NodeJS环境下类似于java-xmlbuilder的XML构建工具，转换成JS可以直接在Mars下使用。\n* __examples__: 模块使用示例\n\n使用方法\n----------------\n\n在Mars环境下，模板页面通过require来引入一个模块，如：\n\n```javascript\nvar _ = require(\"dd://modules/underscore/1.3.3/underscore\"),\n    n = _.min([6, 2, 8, 9, 3]);\nwrite(n); // 页面输出：2\n```\n\n官方托管模块路径的规则是：\n\n    dd://modules/ + 模块文件路径（repo目录下）\n\n注：若模块路径中的文件名无后缀，则会自动添加`.js`。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirede%2Fmars-modules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirede%2Fmars-modules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirede%2Fmars-modules/lists"}