{"id":21125357,"url":"https://github.com/sayll/avalon-webpack-start","last_synced_at":"2025-07-08T23:31:18.027Z","repository":{"id":91747160,"uuid":"75363689","full_name":"sayll/avalon-webpack-start","owner":"sayll","description":"webpack3.X（启用tree-shaking,作用域提升功能等），加速项目启动","archived":false,"fork":false,"pushed_at":"2017-10-07T05:07:41.000Z","size":1869,"stargazers_count":192,"open_issues_count":0,"forks_count":23,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-04T12:51:07.229Z","etag":null,"topics":["avalon","dll","webpack","webpack-start"],"latest_commit_sha":null,"homepage":"","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/sayll.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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-12-02T05:28:00.000Z","updated_at":"2024-11-12T09:19:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"e84dfd6e-666c-4708-949d-67aa2c2f9bf4","html_url":"https://github.com/sayll/avalon-webpack-start","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/sayll/avalon-webpack-start","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayll%2Favalon-webpack-start","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayll%2Favalon-webpack-start/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayll%2Favalon-webpack-start/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayll%2Favalon-webpack-start/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sayll","download_url":"https://codeload.github.com/sayll/avalon-webpack-start/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayll%2Favalon-webpack-start/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264365463,"owners_count":23596838,"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":["avalon","dll","webpack","webpack-start"],"created_at":"2024-11-20T04:33:04.077Z","updated_at":"2025-07-08T23:31:18.022Z","avatar_url":"https://github.com/sayll.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# avalon-webpack-start\n[![Coverage Status](https://travis-ci.org/sayll/avalon-webpack-start.svg?branch=master)](https://travis-ci.org/sayll/avalon-webpack-start)  [![Coverage Status](https://coveralls.io/repos/github/sayll/avalon-webpack-start/badge.svg)](https://coveralls.io/github/sayll/avalon-webpack-start) [![Coverage Status](https://codeclimate.com/github/sayll/avalon-webpack-start/badges/gpa.svg)](https://codeclimate.com/github/sayll/avalon-webpack-start)\n\n\u003cb\u003eVue 用户请转至：[vue-start](https://github.com/sayll/vue-start)\u003c/b\u003e\n\n\u003cb\u003eReact 用户请转至：[react-webpack-start](https://github.com/sayll/react-webpack-start)\u003c/b\u003e\n\n\u003cb\u003e低版本IE 用户请转至：[ie-webpack-start](https://github.com/sayll/ie-webpack-start)\u003c/b\u003e\n\n\u003cb\u003e旧版脚手架[v2.1.0](https://github.com/sayll/avalon-webpack-start/tree/v2.1.0)\n\n## 介绍\n本版本删减了许多模块及功能，让脚手架更轻型，更易扩展，自定义。\n本项目使用[`avalon2`](https://github.com/RubyLouvre/avalon)作为演示框架,演示如何进入开发。\n\n### 关于本项目功能\n1. 服务端使用Express。需要注意的是，只有一个目的那就是提供了`webpack-dev-middleware` 和 `webpack-hot-middleware`（代码热替换）。使用自定义的Express程序替换[webpack-dev-server](https://github.com/webpack/webpack-dev-server)，让它更容易实现universal 渲染和为了不使这个包过于庞大。\n2. 针对不同的loader采用了多线程编译，极大的加快了编译速度。\n3. 使用webpack.DllReferencePlugin提取固定资源，加快编译与打包速度。\n4. 启动tree-shaking\n5. 启动webpack3版本：作用域提升功能\n6. Babel配有transform-runtime让代码更优化。\n7. 支持单页应用和多页应用的混合开发\n8. 自动引入页面的CSS和JS文件。无需手动设置URL\n9. 更改文件,防缓存的hash规则\n10. css的模块化，默认使用postcss + postcss-cssnext，内置处理浏览器前缀。[查看更多](http://cssnext.io/）\n11. 全面支持ES6的最新特性，打包转义为ES5为低版本浏览器提供支持\n12. 快速编译，热更新，自动刷新\n\n## 程序目录\n\n```\n├── dist                     # 打包资源\n├── internals                # 项目配置文件\n│   ├── webpack              # webpack配置文件夹\n│   └── index.js             # 公共配置文件\n├── static                   # 静态资源,直接绕过打包\n├── app                      # 程序源文件\n└── .cache-loader            # 启动服务后的缓存文件，用于下次快速启动服务\n```\n\n## 项目启动\n\n### 环境配置\n* 为了把保证项目正常运行，请自行更新相关环境。\n1. 安装[node.js](https://nodejs.org/)\n2. 安装[git](https://git-scm.com/)\n\n### 依赖配置\n1. 首先clone项目\n```bash\n$ git clone https://github.com/sayll/avalon-webpack-start.git\n$ cd avalon-webpack-start\n```\n\n2. 下载依赖\n* 请确保你的环境配置完成，然后就可以开始以下步骤\n  ```bash\n  $ npm install                   # Install project dependencies\n  $ npm start                     # Compile and launch\n  ```\n如果一切顺利,就能正常打开端口:[http://127.0.0.1:3001/](http://127.0.0.1:3001/)\n\n## 命令说明\n\n开发过程中，你用得最多的会是`npm run dev`，但是这里还有很多其它的处理：\n\n|`npm run \u003cscript\u003e`|Explain|\n|------------------|-----------|\n|start|初始化启动项目（生成Dll文件并启动服务）|\n|dll|生成依赖文件（Dll）|\n|dev|快速启动项目（生成Dll文件下，可加快启动服务）|\n|bundle|打包资源分析仪|\n|build|打包测试环境资源|\n|deploy|打包生产环境资源|\n\n* 第一次运行使用 `start`,后续调试使用`dev`\n\n## 使用手册\n\n* 项目目录`app`中`views`目录内新建文件夹，文件夹名称即为HTML的名称\n* 文件内的index.html, index.js, index.css将会被自动索引，打包到资源中\n* `static`目录为静态文件目录，可直接通过'/static/*'访问到资源\n* 项目默认关闭eslint，如需开启请到`internals/index.js`配置。\n* 项目中使用的各类库请直接到`internals/index.js`中的vendors配置。\n\n\u003e 更多修改配置请参考`internals/index.js`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayll%2Favalon-webpack-start","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsayll%2Favalon-webpack-start","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayll%2Favalon-webpack-start/lists"}