{"id":20739465,"url":"https://github.com/vxhly/vue-cli-plugin-preset-tpl","last_synced_at":"2026-05-15T22:37:06.545Z","repository":{"id":96440518,"uuid":"175535353","full_name":"vxhly/vue-cli-plugin-preset-tpl","owner":"vxhly","description":"Preset templates for Vue CLI 3","archived":false,"fork":false,"pushed_at":"2019-05-06T03:54:18.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-08T23:33:33.340Z","etag":null,"topics":["preset","preset-tpl","templates","vue","vue-cli3"],"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/vxhly.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":"2019-03-14T02:40:15.000Z","updated_at":"2019-05-06T02:25:47.000Z","dependencies_parsed_at":"2023-03-13T16:31:32.167Z","dependency_job_id":null,"html_url":"https://github.com/vxhly/vue-cli-plugin-preset-tpl","commit_stats":{"total_commits":32,"total_committers":1,"mean_commits":32.0,"dds":0.0,"last_synced_commit":"5bfdcc5a1487c3a9c9cb2bc210616610b0c0abd9"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/vxhly/vue-cli-plugin-preset-tpl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vxhly%2Fvue-cli-plugin-preset-tpl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vxhly%2Fvue-cli-plugin-preset-tpl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vxhly%2Fvue-cli-plugin-preset-tpl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vxhly%2Fvue-cli-plugin-preset-tpl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vxhly","download_url":"https://codeload.github.com/vxhly/vue-cli-plugin-preset-tpl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vxhly%2Fvue-cli-plugin-preset-tpl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274231172,"owners_count":25245675,"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-08T02:00:09.813Z","response_time":121,"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":["preset","preset-tpl","templates","vue","vue-cli3"],"created_at":"2024-11-17T06:25:02.806Z","updated_at":"2026-05-15T22:37:01.514Z","avatar_url":"https://github.com/vxhly.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-cli-plugin-preset-tpl\n\n[![NPM version](https://img.shields.io/npm/v/vue-cli-plugin-preset-tpl.svg?style=flat-square)](https://www.npmjs.com/package/vue-cli-plugin-preset-tpl) [![GitHub forks](https://img.shields.io/github/forks/vxhly/vue-cli-plugin-preset-tpl.svg)](https://github.com/vxhly/vue-cli-plugin-preset-tpl/network) [![GitHub stars](https://img.shields.io/github/stars/vxhly/vue-cli-plugin-preset-tpl.svg)](https://github.com/vxhly/vue-cli-plugin-preset-tpl/stargazers) [![NPM download](https://img.shields.io/npm/dm/vue-cli-plugin-preset-tpl.svg?style=flat-square)](https://npmjs.org/package/vue-cli-plugin-preset-tpl) [![GitHub license](https://img.shields.io/github/license/vxhly/vue-cli-plugin-preset-tpl.svg)](https://github.com/vxhly/vue-cli-plugin-preset-tpl/blob/master/LICENSE)\n\n\u003e 基于 VUE CLI 3 的自定义预设模板\n\n## 特性\n\n脚手架默认开启如下功能\n\n- sass 处理器（node-sass）\n- vue-router（hash 模式）\n- vuex\n- axios\n- mockjs\n- ElementUI\n- [git commit 规范](https://vxhly.github.io/archives/fdd4f330.html)\n- 构建时开启 gzip 压缩\n\n可配置添加功能模块\n\n- lodash\n- moment\n\n## preset.json\n\n```json\n{\n  \"useConfigFiles\": true,\n  \"plugins\": {\n    \"@vue/cli-plugin-babel\": {},\n    \"@vue/cli-plugin-eslint\": {\n      \"config\": \"standard\",\n      \"lintOn\": [\n        \"save\",\n        \"commit\"\n      ]\n    },\n    \"vue-cli-plugin-element\": {\n      \"prompts\": true\n    },\n    \"vue-cli-plugin-preset-tpl\": {}\n  },\n  \"router\": true,\n  \"routerHistoryMode\": false,\n  \"vuex\": true,\n  \"cssPreprocessor\": \"node-sass\"\n}\n```\n\n## 安装使用\n\n使用 vue-cli 3.0 常规创建一个项目\n\n```bash\nvue create my-app\ncd my-app\nvue add preset-tpl\n```\n\n或者可以直接这样安装（推荐）\n\n```bash\nvue create --preset vxhly/vue-cli-plugin-preset-tpl my-app\n```\n\n## 目录结构\n\n```bash\n│  vue.config.js\n│\n└─src\n    │  App.vue\n    │  main.js\n    │\n    ├─api\n    │      axios.js\n    │      errorMessage.js\n    │      index.js\n    │\n    ├─assets\n    │  │  logo.png\n    │  │\n    │  └─styles\n    │      └─public\n    │              common.scss\n    │              public.scss\n    │              reset.scss\n    │\n    ├─mock\n    │      index.js\n    │\n    ├─router\n    │      index.js\n    │\n    └─store\n        │  index.js\n        │\n        ├─modules\n        │      example.js\n        │      index.js\n        │\n        └─types\n                example-types.js\n```\n\n## 其他\n\n\u003e 灵感来源1 =\u003e [vue-cli-plugin-custom-tpl](https://github.com/natee/vue-cli-plugin-custom-tpl)\n\u003e 灵感来源2 =\u003e [vue-cli-plugin-element](https://github.com/ElementUI/vue-cli-plugin-element)\n\u003e 灵感来源3 =\u003e [vue-cli-plugin-ant-design](https://github.com/vueComponent/vue-cli-plugin-ant-design)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvxhly%2Fvue-cli-plugin-preset-tpl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvxhly%2Fvue-cli-plugin-preset-tpl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvxhly%2Fvue-cli-plugin-preset-tpl/lists"}