{"id":19660953,"url":"https://github.com/o2team/elf","last_synced_at":"2025-04-12T20:46:01.512Z","repository":{"id":174436233,"uuid":"73051547","full_name":"o2team/elf","owner":"o2team","description":"灵活可扩展的 HTML5 构建工具","archived":false,"fork":false,"pushed_at":"2023-10-26T00:35:36.000Z","size":8534,"stargazers_count":494,"open_issues_count":10,"forks_count":67,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-04-04T10:09:52.336Z","etag":null,"topics":["build-tool","elf","html","html5","nodejs","webpack"],"latest_commit_sha":null,"homepage":"https://elf.aotu.io","language":"JavaScript","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/o2team.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-07T07:10:11.000Z","updated_at":"2025-04-02T07:30:46.000Z","dependencies_parsed_at":"2024-01-31T17:49:04.272Z","dependency_job_id":null,"html_url":"https://github.com/o2team/elf","commit_stats":null,"previous_names":["o2team/elf","o2team/h5-boilerplate"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/o2team%2Felf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/o2team%2Felf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/o2team%2Felf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/o2team%2Felf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/o2team","download_url":"https://codeload.github.com/o2team/elf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631696,"owners_count":21136559,"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":["build-tool","elf","html","html5","nodejs","webpack"],"created_at":"2024-11-11T16:06:02.156Z","updated_at":"2025-04-12T20:46:01.486Z","avatar_url":"https://github.com/o2team.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://elf.aotu.io\"\u003e\n    \u003cimg alt=\"ELF\" src=\"https://misc.aotu.io/booxood/elf/logo.png\" width=\"200\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nELF - 面向开发者的灵活可扩展的 HTML5 构建工具，提供命令行工具 elf（基于 Webpack），**无需构建配置文件即可进行开发**，可用来制作各种 HTML5 场景营销活动页面，也可自由的通过模板和组件的组合来快速定制开发。\n\n[**配置说明**](https://github.com/o2team/elf/blob/master/doc/CONFIGURATION.md)\n[**功能描述**](https://github.com/o2team/elf/blob/master/doc/DETAIL.md)\n\n## 安装 [![NPM version][npm-version-image]][npm-version-url] [![Join the chat at https://gitter.im/o2team/elf](https://badges.gitter.im/o2team/elf.svg)](https://gitter.im/o2team/elf?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n\u003e **`提醒`**\n由于依赖的包比较多，第一次安装耗时很长很长，请稍微耐心等待一下。\n推荐使用淘宝的 npm 镜像进行安装，执行 npm 安装命令时带上 `--registry=https://registry.npmmirror.com`。\n另外 `node-sass` 和 `phantomjs` 这两个包需要编译，可以设置 `SASS_BINARY_SITE=https://npmmirror.com/mirrors/node-sass/`\n和 `PHANTOMJS_CDNURL=https://npmmirror.com/mirrors/phantomjs/`，安装已经编译好的版本。\n\n```sh\n# 全局安装 Node \u003e= 6\n# mac/linux\n$ SASS_BINARY_SITE=https://npmmirror.com/mirrors/node-sass/ PHANTOMJS_CDNURL=https://npmmirror.com/mirrors/phantomjs/ npm install -g elf-cli --registry=https://registry.npmmirror.com\n# windows\n$ npm install -g elf-cli --registry=https://registry.npmmirror.com --SASS_BINARY_SITE=https://npmmirror.com/mirrors/node-sass/ --PHANTOMJS_CDNURL=https://npmmirror.com/mirrors/phantomjs/\n```\n\n## 使用\n\n```sh\n# 初始化项目\n$ elf init demo\n\n# 安装依赖\n$ cd demo \u0026\u0026 npm install\n\n# 开发运行\n$ elf start\n\n# 查看 help\n$ elf --help\n```\n\n## 介绍\n\n### 主要功能\n\n- 开发时样式热加载\n- 支持 Sass、Less 和 Stylus 样式预处理自动编译\n- Autoprefixer 前缀补全\n- px -\u003e rem 自动转换\n- 雪碧图合成\n- 自动获取图片 width 和 height\n- 部署构建时图片压缩\n- 部署构建时代码合并压缩\n\n### 相关组件依赖\n\n- [Zepto](http://zeptojs.com/) 默认引入\n\n### 基础目录结构\n\n很多预制的功能与目录结构相关，请确认项目包含以下文件和目录，否则可能执行失败。\n\n```sh\n.\n├── package.json\n└── src\n    ├── css\n    │   └── main.scss               # 引入的样式文件（在 main.js 中）\n    ├── img                         # 图片 资源的目录\n    ├── plugin                      # 音频 资源的目录（可选）\n    ├── index.html                  # html 模板\n    └── js\n        └── main.js                 # 入口 js 文件\n```\n\n## 感谢\n\n项目的灵感和某些 Webpack 的配置来自 [create-react-app](https://github.com/facebookincubator/create-react-app)\n\n## 许可\n\nMIT\n\n[npm-version-image]: https://img.shields.io/npm/v/elf-cli.svg?style=flat-square\n[npm-version-url]: https://www.npmjs.com/package/elf-cli\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fo2team%2Felf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fo2team%2Felf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fo2team%2Felf/lists"}