Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.

Commit 2c41860

Browse files
committed
init project
0 parents  commit 2c41860

File tree

345 files changed

+12925
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

345 files changed

+12925
-0
lines changed

.editorconfig

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset=utf-8
6+
end_of_line=lf
7+
insert_final_newline=true
8+
trim_trailing_whitespace=true
9+
indent_style=space
10+
indent_size=2
11+
12+
[{.eslintrc,.babelrc,.stylelintrc,*.json}]
13+
indent_style=space
14+
indent_size=2
15+
16+
[*.less]
17+
indent_style=space
18+
indent_size=2
19+
20+
[*.{js,jsx,ts,tsx,vue}]
21+
indent_style=space
22+
indent_size=2
23+

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.eslintrc.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
parser: "babel-eslint",
7+
parserOptions: {
8+
sourceType: "module",
9+
allowImportExportEverywhere: true
10+
},
11+
extends: "standard",
12+
rules: {
13+
indent: ["error", 2],
14+
"no-unused-vars": "off"
15+
}
16+
};

.github/workflows/masterMergemain.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: master Merge main
2+
3+
on:
4+
# 推送代码后触发
5+
push:
6+
branches:
7+
- main
8+
jobs:
9+
merge:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Using REST API pre-master2 Merge pre-master
13+
run: |
14+
curl \
15+
-X POST \
16+
-H "Accept: application/vnd.github.v3+json" \
17+
-H "content-type: application/json" \
18+
-H "authorization: Bearer ${{ secrets.ACCESS_TOKEN }}" \
19+
https://github.com/cloud-templates/GithubAction/merges \
20+
-d '{"base":"master","head":"main"}'
21+

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.DS_Store
2+
node_modules
3+
4+
docs/.vuepress/dist/
5+
6+
# local env files
7+
.env.local
8+
.env.*.local
9+
10+
# Log files
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
15+
# Editor directories and files
16+
.idea
17+
.vscode
18+
.history
19+
*.suo
20+
*.ntvs*
21+
*.njsproj
22+
*.sln
23+
*.sw*
24+
25+
yarn.lock

.gitpod.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tasks:
2+
- init: yarn install

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
**/*.svg
2+
package.json
3+
output.js
4+
generator/

.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"semi": true,
3+
"useTabs": false,
4+
"tabWidth": 2,
5+
"singleQuote": true,
6+
"trailingComma": "none",
7+
"proseWrap": "never",
8+
"arrowParens": "always",
9+
"vueIndentScriptAndStyle": true,
10+
"endOfLine": "lf"
11+
}

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/cloud-templates/vue-preset)
2+
3+
# vue-preset
4+
结合 vue-cli4.x 的 preset 搭建基于 git repo 的前端项目模板。**支持Vue3.0特性**
5+
6+
**推荐使用**[create-project](https://github.com/cloud-templates/create-project),以更快的速度创建项目!
7+
8+
## 快速开始
9+
10+
```bash
11+
# 安装 vue-cli 4.0
12+
npm install -g @vue/cli
13+
14+
# 根据远程 preset 创建项目
15+
vue create --preset cloud-templates/vue-preset my-project
16+
# or
17+
vue create --preset direct:https://github.com/cloud-templates/vue-preset.git my-project --clone
18+
19+
# 本地预览
20+
cd my-project && yarn run serve
21+
22+
```
23+
24+
## 文档
25+
```bash
26+
# 本地预览
27+
npm run docs:dev
28+
29+
# 构建部署版本
30+
npm run docs:build
31+
```
32+
## 待办
33+
- [ ] 新增**多页**模板
34+
- [x] 支持 REST 接口规范,可以参考 [restful](https://github.com/cklwblove/vue-preset/blob/ece3b851d947ec00d42815919ca32bb1e84be1b3/generator/template/src/services/request.js#L136)
35+
- [x] axios retry 特性,可以参考 [axios-retry](https://github.com/cklwblove/vue-preset/blob/axios-retry/generator/template/src/services/request.js)
36+
- [x] axios cancel request
37+
- [x] 引入 vant-ui
38+
- [x] 新增**TS**模板
39+
- [x] 新增离线包相关特性
40+
- [x] 支持vue3.0
41+
- [x] vue2.x 支持新的构建工具 vite
42+
43+
## 统计
44+
![Alt](https://repobeats.axiom.co/api/embed/180b11b920e072bf5bdde5581431de24bc1bbf90.svg "Repobeats analytics image")

docs/.vuepress/config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
base: '/vue-preset/',
3+
serviceWorker: true,
4+
title: 'vue-preset 说明文档',
5+
head: [
6+
['link', { rel: 'icon', href: './favicon.ico' }]
7+
],
8+
themeConfig: {
9+
sidebar: 'auto',
10+
repo: 'https://github.com/cklwblove/vue-preset',
11+
docsDir: 'docs',
12+
serviceWorker: {
13+
updatePopup: true
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)