{"id":14976463,"url":"https://github.com/brickies/vue-template","last_synced_at":"2025-10-27T20:31:48.884Z","repository":{"id":91380574,"uuid":"129517153","full_name":"Brickies/vue-template","owner":"Brickies","description":":tada:  一个集成了 webpack + vue-loader + vuex + axios 的自定义 vue-cli 模板，其中包含 webpack 热更新，linting，测试以及 css 处理器等内容","archived":false,"fork":false,"pushed_at":"2023-03-01T20:19:11.000Z","size":262,"stargazers_count":26,"open_issues_count":3,"forks_count":6,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2025-02-01T08:05:36.294Z","etag":null,"topics":["axios","eslint","vue","vue-router","vue-template-webpack","vuex","webpack3"],"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/Brickies.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":"2018-04-14T12:59:52.000Z","updated_at":"2024-11-21T05:16:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"bfe9576a-4bd7-4f8e-8ead-b151f5140063","html_url":"https://github.com/Brickies/vue-template","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":0.09090909090909094,"last_synced_commit":"4aa520be715d06576f288fa51d6bba1c0edad758"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brickies%2Fvue-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brickies%2Fvue-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brickies%2Fvue-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brickies%2Fvue-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Brickies","download_url":"https://codeload.github.com/Brickies/vue-template/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238553202,"owners_count":19491390,"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":["axios","eslint","vue","vue-router","vue-template-webpack","vuex","webpack3"],"created_at":"2024-09-24T13:53:55.595Z","updated_at":"2025-10-27T20:31:43.586Z","avatar_url":"https://github.com/Brickies.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue webpack 模板\n\n\u003e 一个集成了 webpack + vue-loader + vuex + axios 的自定义 vue-cli 模板，其中包含 webpack 热更新，linting，测试以及 css 处理器等内容\n\n\u003e 该模板兼容 Vue2.0 . 对于 Vue1.x，执行命令：`vue init Brickies/vue-template#1.0 my-project`\n\n英文文档 : [English Doc](https://github.com/Brickies/vue-template/blob/master/README_en-US.md)\n\n## 用法\n\n这是一个 [vue-cli](https://github.com/vuejs/vue-cli) 的项目模板 . **建议使用 npm3+ 进行依赖的安装**\n\n``` bash\n$ npm install -g vue-cli\n$ vue init Brickies/vue-template my-project\n$ cd my-project\n$ npm install\n$ npm run dev\n```\n\n默认情况下，本地开发服务器将在 8080 端口运行 . 如果该端口已在你机器上运行，那么将会自动使用下一个空闲端口 .\n\n## 包含的内容\n\n- `npm run dev`: 本地开发命令\n  - Webpack + `vue-loader` 用于单文件 Vue 组件\n  - 实时热更新\n  - 实时编译错误覆盖\n  - eslint 实时检测\n  - Source maps\n\n- `npm run build`: 打包命令\n  - JavaScript 文件使用 [UglifyJS v3](https://github.com/mishoo/UglifyJS2/tree/harmony) 进行压缩 .\n  - HTML 文件使用 [html-minifier](https://github.com/kangax/html-minifier) 进行压缩 .\n  - 所有组件中的 CSS 打包到单个文件并使用 [cssnano](https://github.com/ben-eb/cssnano) 进行压缩 .\n  - 静态资源使用 hash 编译以实现有效的长期缓存，以及在打包自动生成的 `index.html` 文件中为这些资源进行自动引用 .\n  - 使用 `npm run build --report` 进行打包分析\n\n- `npm run unit`: 在 [JSDOM](https://github.com/tmpvar/jsdom) 中使用 [Jest](https://facebook.github.io/jest/) 进行单元测试，或者在 PhantomJS 中使用 Karma + Mocha + karma-webpack 进行单元测试.\n  - 测试文件支持 ES2015 + .\n  - 容易 mocking .\n\n- `npm run e2e`: 使用 [Nightwatch](http://nightwatchjs.org/) 进行端对端测试 .\n  - 测试并行运行在多个浏览器中 .\n  - 使用一个命令就可做到开箱即用:\n    - 自动处理 Selenium 和 chromedriver 的依赖关系 .\n    - 自动生成 Selenium 服务 .\n\n### 将项目 fork 下来做一个属于自己的\n\n你可以通过 fork 该项目然后去创建一个属于你自己的模板, 并配合 `vue-cli` 进行使用:\n\n``` bash\nvue init username/repo my-project\n```\n\n### 特别感谢\n\n[vuejs-templates/webpack](https://github.com/vuejs-templates/webpack)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrickies%2Fvue-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrickies%2Fvue-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrickies%2Fvue-template/lists"}