{"id":13668974,"url":"https://github.com/cssmagic/sample","last_synced_at":"2025-04-22T18:04:40.193Z","repository":{"id":31001889,"uuid":"34560285","full_name":"cssmagic/sample","owner":"cssmagic","description":"File templates for front-end projects.","archived":false,"fork":false,"pushed_at":"2019-02-07T08:37:29.000Z","size":27,"stargazers_count":23,"open_issues_count":2,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T17:28:57.000Z","etag":null,"topics":["doc","open-source","project-template","scaffolding"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cssmagic.png","metadata":{"files":{"readme":"README.full.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-25T07:55:15.000Z","updated_at":"2024-11-26T15:23:51.000Z","dependencies_parsed_at":"2022-08-26T08:21:22.228Z","dependency_job_id":null,"html_url":"https://github.com/cssmagic/sample","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssmagic%2Fsample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssmagic%2Fsample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssmagic%2Fsample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssmagic%2Fsample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cssmagic","download_url":"https://codeload.github.com/cssmagic/sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250296085,"owners_count":21407036,"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":["doc","open-source","project-template","scaffolding"],"created_at":"2024-08-02T08:00:56.471Z","updated_at":"2025-04-22T18:04:40.148Z","avatar_url":"https://github.com/cssmagic.png","language":"HTML","readme":"# Sample\n\n\u003e File templates for front-end projects.\n\n## 简介\n\n每次在 GitHub 新建一个前端小项目，都要做一遍繁琐的、重复的 “文案工作”？那不如把常用文件汇总为一个项目模板吧，以后新建项目时直接复制出来填填改改就可以了。\n\n现在可用以下源码文件模板：\n\n* `README.md` （稍复杂的项目可以选用 `README.full.md`）\n* `.gitignore`\n* `package.json`\n* `bower.json`\n* `.editorconfig`\n* `src/*.*`\n* `test/*.*`\n* `gulpfile.js`\n* `redir.html` （适用于 GitHub Pages 的重定向页面）\n\n以及文档模板：\n\n* `doc/*.md`\n* `wiki/*.md`\n* `releases/*.md`\n\n## 兼容性\n\n#### 浏览器支持\n\n* 支持以下移动平台的主流浏览器：\n\t* iOS 5+\n\t* Android 2.3+\n\n* 同样支持以下桌面浏览器：\n\t* Firefox (edge)\n\t* Chrome (edge)\n\t* Safari (edge)\n\n#### 外部依赖\n\n* Underscore 1.6+\n* Zepto 1.1+\n\n## 安装\n\n0. 通过 Bower 安装：\n\n\t```sh\n\t$ bower install {sample}\n\t```\n\n0. 在页面中加载 {Sample} 的样式文件、脚本文件及必要的依赖：\n\n\t```html\n\t\u003c!DOCTYPE html\u003e\n\t\u003chtml\u003e\n\t\u003chead\u003e\n\t\t...\n\t\t\u003clink rel=\"stylesheet\" href=\"bower_components/{sample}/dist/{sample}.css\"\u003e\n\t\u003c/head\u003e\n\t\u003cbody\u003e\n\t\t...\n\t\t\u003cscript src=\"bower_components/underscore/underscore-min.js\"\u003e\u003c/script\u003e\n\t\t\u003cscript src=\"bower_components/jquery/dist/jquery.min.js\"\u003e\u003c/script\u003e\n\t\t\u003cscript src=\"bower_components/zepto.js/dist/zepto.min.js\"\u003e\u003c/script\u003e\n\t\t\u003cscript src=\"bower_components/{sample}/src/{sample}.js\"\u003e\u003c/script\u003e\n\t\u003c/body\u003e\n\t\u003c/html\u003e\n\t```\n\n## API 文档\n\n* {Sample} 提供了简洁易用的 API，[详见此文档](https://github.com/cssmagic/sample/issues/1)。\n* 此外，建议阅读 [Wiki](https://github.com/cssmagic/sample/wiki) 来获取更多信息。\n\n## 谁在用？\n\n以下开源项目采用 {Sample} 作为基础组件：\n\n* [CMUI](https://github.com/CMUI/CMUI)\n\n因此，本项目运行在以下网站：\n\n* [某某网站](https://github.com/cssmagic/sample)\n\n***\n\n## 参与开发\n\n#### 构建\n\n0. 把本项目的代码 fork 并 clone 到本地。\n0. 在项目根目录执行 `npm install`，安装必要的依赖。\n0. 在项目根目录执行 `npm run dist`，运行构建脚本。\n0. 构建生成的发布文件将保存到 `/dist` 目录下。\n\n#### 单元测试\n\n0. 把本项目的代码 fork 并 clone 到本地。\n0. 在项目根目录执行 `bower install`，安装必要的依赖。\n0. 在浏览器中打开以下文件即可运行单元测试：\n\t* `test/test-dev.html` - 测试源码\n\t* `test/test-dist.html` - 测试发布文件\n\n如果想在移动设备上运行单元测试，可尝试以下任一方法：\n\n* 在本地建立 Web 服务，以便移动设备通过局域网访问上述单元测试页面。\n* 把本项目的所有文件（及必要的依赖）发布至公网，以便移动设备访问上述单元测试页面。\n\n***\n\n## License\n\n[MIT License](http://www.opensource.org/licenses/mit-license.php)\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssmagic%2Fsample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcssmagic%2Fsample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssmagic%2Fsample/lists"}