{"id":15297228,"url":"https://github.com/zanseven007/generator-zyy-h5","last_synced_at":"2025-09-22T08:28:38.212Z","repository":{"id":57249500,"uuid":"67858489","full_name":"zanseven007/generator-zyy-h5","owner":"zanseven007","description":"A lovely H5 template","archived":false,"fork":false,"pushed_at":"2018-03-26T13:31:58.000Z","size":912,"stargazers_count":23,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-17T14:15:04.408Z","etag":null,"topics":["css3","gulp","html5","js","webpack"],"latest_commit_sha":null,"homepage":"https://github.com/zanseven007/generator-zyy-h5","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/zanseven007.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":"2016-09-10T07:52:30.000Z","updated_at":"2023-08-31T05:09:42.000Z","dependencies_parsed_at":"2022-09-09T00:20:26.216Z","dependency_job_id":null,"html_url":"https://github.com/zanseven007/generator-zyy-h5","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/zanseven007/generator-zyy-h5","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanseven007%2Fgenerator-zyy-h5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanseven007%2Fgenerator-zyy-h5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanseven007%2Fgenerator-zyy-h5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanseven007%2Fgenerator-zyy-h5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zanseven007","download_url":"https://codeload.github.com/zanseven007/generator-zyy-h5/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanseven007%2Fgenerator-zyy-h5/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276163493,"owners_count":25596014,"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","status":"online","status_checked_at":"2025-09-20T02:00:10.207Z","response_time":63,"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":["css3","gulp","html5","js","webpack"],"created_at":"2024-09-30T19:15:46.091Z","updated_at":"2025-09-22T08:28:38.166Z","avatar_url":"https://github.com/zanseven007.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 基于webpack和gulp的H5小项目生成器\n\n[English docs](https://github.com/zanseven007/generator-zyy-h5/blob/master/README_en.md)\n\n\n\u003e - H5 日益普及，为了方便日后开发的方便，特此写一个模板生成器为日后使用\n\u003e - 在HTML中支持使用 @@include 引入一个 .inc 文件\n\u003e - 在CSS文件中可以使用 scss 进行开发，发布时将小图片转换为base64格式\n\u003e - 预置了一些动画库和常用的动画逻辑代码，方便写出丝滑的动画\n\u003e - 在JS当中利用webpack合并了公共模块，可以有任意个入口文件,并区分生产和开发环境（开发环境不进行代码压缩，极大提高打包速度）\n\u003e - 开发时可自动启动 Chrome 浏览器，并且打开本地3000端口来调试\n\n## 使用yoeman创建模板\n安装 yo\n\n```\n[sudo] npm install -g yo\n```\n安装H5模板生成器\n\n```\n[sudo] npm install -g generator-zyy-h5\n```\n新建一个项目目录并进入\n\n```\nmkdir my-new-h5 \u0026\u0026 cd $_\n```\n使用H5模板，这个命令会自动安装依赖(npm install)，建议终止掉，然后使用 `cnpm` 或 `yarn` 来安装，因为速度飞快。\n\n```\nyo zyy-h5\n```\n\n## 使用模板\n开发\n\n```\ngulp dev\n```\n发布(会压缩css和js，并增加md5)\n```\ngulp dist\n```\n\n## 可选参数\n\n- `--html` 压缩 html 文件，发布线上需要时可以加上 `gulp dist --html`\n\n\n## ISSUE\n\n**node-sass安装失败解决办法**：因为在安装`node-sass`的时候它把github Releases里的文件都托管在`s3.amazonaws.com`上面，而这个网址在国内总是网络不稳定，所以推荐使用`cnpm`,`yarn`来安装我们的依赖，也可以通过淘宝镜像去下载这个文件。\n\n直接运行下面的命令即可\n\n```\nSASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ npm install node-sass  \u0026\u0026 npm install gulp-sass\n```\n\n## License\nMIT © [zanseven007](https://github.com/zanseven007)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzanseven007%2Fgenerator-zyy-h5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzanseven007%2Fgenerator-zyy-h5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzanseven007%2Fgenerator-zyy-h5/lists"}