Commit ad36886559763b5471eb5f56c4f350f5c123dd94
1 parent
118db6be
chore: add .github and .vscode
Showing
10 changed files
with
522 additions
and
0 deletions
.github/ISSUE_TEMPLATE/1-bug.md
0 → 100644
1 | +--- | |
2 | +name: 🐛 Bug report | |
3 | +about: Create a report to help us improve | |
4 | +labels: 🔍 status/open, 🐛 type/bug | |
5 | +--- | |
6 | + | |
7 | +<!-- | |
8 | +Ouch, sorry you’ve run into a bug. Thank for taking the time to report it! | |
9 | + | |
10 | +Please fill in as much of the template below as you’re able. | |
11 | + | |
12 | +P.S. have you seen our support and contributing docs? | |
13 | +https://github.com/get-alex/.github/blob/master/support.md | |
14 | +https://github.com/get-alex/.github/blob/master/contributing.md | |
15 | +--> | |
16 | + | |
17 | +### Subject of the issue | |
18 | + | |
19 | +Describe your issue here. | |
20 | + | |
21 | +### Your environment | |
22 | + | |
23 | +- **OS**: <!-- Name and version of operating system --> | |
24 | +- **Packages**: <!-- Names and version of required packages --> | |
25 | +- **Env**: <!-- Version of node, npm, yarn, or names and versions of browser --> | |
26 | + | |
27 | +### Steps to reproduce | |
28 | + | |
29 | +Tell us how to reproduce this issue. Please provide a working and simplified example. | |
30 | + | |
31 | +🎉 BONUS POINTS for creating a [minimal reproduction](https://stackoverflow.com/help/mcve) and uploading it to GitHub. This will get you the fastest support. 🎉 | |
32 | + | |
33 | +### Expected behaviour | |
34 | + | |
35 | +What should happen? | |
36 | + | |
37 | +### Actual behaviour | |
38 | + | |
39 | +What happens instead? | ... | ... |
.github/ISSUE_TEMPLATE/2-feature.md
0 → 100644
1 | +--- | |
2 | +name: 🚀 Feature request | |
3 | +about: Suggest an idea for this project | |
4 | +labels: 🔍 status/open, 🦋 type/enhancement | |
5 | +--- | |
6 | + | |
7 | +<!-- | |
8 | +Thank you for suggesting an idea to make this project better! | |
9 | + | |
10 | +Please fill in as much of the template below as you’re able. | |
11 | + | |
12 | +--> | |
13 | + | |
14 | +### Subject of the feature | |
15 | + | |
16 | +Describe your issue here. | |
17 | + | |
18 | +### Problem | |
19 | + | |
20 | +If the feature requests relates to a problem, please describe the problem you are trying to solve here. | |
21 | + | |
22 | +### Expected behaviour | |
23 | + | |
24 | +What should happen? Please describe the desired behaviour. | |
25 | + | |
26 | +### Alternatives | |
27 | + | |
28 | +What are the alternative solutions? Please describe what else you have considered? | ... | ... |
.github/ISSUE_TEMPLATE/3-help.md
0 → 100644
1 | +--- | |
2 | +name: Question 🤔 | |
3 | +about: Usage question or discussion about alex. | |
4 | +labels: 🔍 status/open, 🙋 type/question | |
5 | +--- | |
6 | + | |
7 | +<!-- | |
8 | +To make it easier for us to help you, please include as much useful information | |
9 | +as possible. | |
10 | + | |
11 | +Before opening a new issue, please search existing issues: | |
12 | +https://github.com/search?q=org%3Aget-alex&type=Issues | |
13 | + | |
14 | + | |
15 | +--> | ... | ... |
.github/commit-convention.md
0 → 100644
1 | +## Git Commit Message Convention | |
2 | + | |
3 | +> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular). | |
4 | + | |
5 | +#### TL;DR: | |
6 | + | |
7 | +Messages must be matched by the following regex: | |
8 | + | |
9 | +```js | |
10 | +/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|build|ci|chore|types|wip): .{1,50}/; | |
11 | +``` | |
12 | + | |
13 | +#### Examples | |
14 | + | |
15 | +Appears under "Features" header, `dev` subheader: | |
16 | + | |
17 | +``` | |
18 | +feat(dev): add 'comments' option | |
19 | +``` | |
20 | + | |
21 | +Appears under "Bug Fixes" header, `dev` subheader, with a link to issue #28: | |
22 | + | |
23 | +``` | |
24 | +fix(dev): fix dev error | |
25 | + | |
26 | +close #28 | |
27 | +``` | |
28 | + | |
29 | +Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation: | |
30 | + | |
31 | +``` | |
32 | +perf(build): remove 'foo' option | |
33 | + | |
34 | +BREAKING CHANGE: The 'foo' option has been removed. | |
35 | +``` | |
36 | + | |
37 | +The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header. | |
38 | + | |
39 | +``` | |
40 | +revert: feat(compiler): add 'comments' option | |
41 | + | |
42 | +This reverts commit 667ecc1654a317a13331b17617d973392f415f02. | |
43 | +``` | |
44 | + | |
45 | +### Full Message Format | |
46 | + | |
47 | +A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: | |
48 | + | |
49 | +``` | |
50 | +<type>(<scope>): <subject> | |
51 | +<BLANK LINE> | |
52 | +<body> | |
53 | +<BLANK LINE> | |
54 | +<footer> | |
55 | +``` | |
56 | + | |
57 | +The **header** is mandatory and the **scope** of the header is optional. | |
58 | + | |
59 | +### Revert | |
60 | + | |
61 | +If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted. | |
62 | + | |
63 | +### Type | |
64 | + | |
65 | +If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. However, if there is any [BREAKING CHANGE](#footer), the commit will always appear in the changelog. | |
66 | + | |
67 | +Other prefixes are up to your discretion. Suggested prefixes are `docs`, `chore`, `style`, `refactor`, and `test` for non-changelog related tasks. | |
68 | + | |
69 | +### Scope | |
70 | + | |
71 | +The scope could be anything specifying the place of the commit change. For example `dev`, `build`, `workflow`, `cli` etc... | |
72 | + | |
73 | +### Subject | |
74 | + | |
75 | +The subject contains a succinct description of the change: | |
76 | + | |
77 | +- use the imperative, present tense: "change" not "changed" nor "changes" | |
78 | +- don't capitalize the first letter | |
79 | +- no dot (.) at the end | |
80 | + | |
81 | +### Body | |
82 | + | |
83 | +Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior. | |
84 | + | |
85 | +### Footer | |
86 | + | |
87 | +The footer should contain any information about **Breaking Changes** and is also the place to reference GitHub issues that this commit **Closes**. | |
88 | + | |
89 | +**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this. | ... | ... |
.github/contributing.md
0 → 100644
1 | +# Contributing Guide | |
2 | + | |
3 | +1. Make sure you put things in the right category! | |
4 | +2. Always add your items to the end of a list. To be fair, the order is first-come-first-serve. | |
5 | +3. If you think something belongs in the wrong category, or think there needs to be a new category, feel free to edit things too. | ... | ... |
.github/pull_request_template.md
0 → 100644
1 | +### `General` | |
2 | + | |
3 | +> ✏️ Mark the necessary items without changing the structure of the PR template. | |
4 | + | |
5 | +- [ ] Pull request template structure not broken | |
6 | + | |
7 | +### `Type` | |
8 | + | |
9 | +> ℹ️ What types of changes does your code introduce? | |
10 | + | |
11 | +> 👉 _Put an `x` in the boxes that apply_ | |
12 | + | |
13 | +- [ ] Bug fix (non-breaking change which fixes an issue) | |
14 | +- [ ] New feature (non-breaking change which adds functionality) | |
15 | +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | |
16 | +- [ ] This change requires a documentation update | |
17 | + | |
18 | +### `Checklist` | |
19 | + | |
20 | +> ℹ️ Check all checkboxes - this will indicate that you have done everything in accordance with the rules in [CONTRIBUTING](https://github.com/vuejs/awesome-vue/blob/master/.github/contributing.md). | |
21 | + | |
22 | +> 👉 _Put an `x` in the boxes that apply._ | |
23 | + | |
24 | +- [ ] My code follows the style guidelines of this project | |
25 | +- [ ] Is the code format correct | |
26 | +- [ ] Is the git submission information standard? | |
27 | +- [ ] My code follows the style guidelines of this project | |
28 | +- [ ] I have performed a self-review of my own code | |
29 | +- [ ] I have commented my code, particularly in hard-to-understand areas | |
30 | +- [ ] I have made corresponding changes to the documentation | |
31 | +- [ ] My changes generate no new warnings | |
32 | +- [ ] I have added tests that prove my fix is effective or that my feature works | |
33 | +- [ ] New and existing unit tests pass locally with my changes | |
34 | +- [ ] Any dependent changes have been merged and published in downstream modules | ... | ... |
.vscode/extensions.json
0 → 100644
.vscode/launch.json
0 → 100644
1 | +{ | |
2 | + "version": "0.2.0", | |
3 | + "configurations": [ | |
4 | + // node环境调试当前激活编辑器ts/js代码 | |
5 | + { | |
6 | + "type": "node", | |
7 | + "request": "launch", | |
8 | + "name": "file", | |
9 | + "cwd": "${workspaceFolder}", | |
10 | + "program": "${file}", | |
11 | + // .vscode 目录又不认识了??? | |
12 | + "preLaunchTask": "tsc: 监视 - build/tsconfig.json", // cn | |
13 | + // "preLaunchTask": "tsc: watch - build/tsconfig.json", // en | |
14 | + "outFiles": ["${workspaceFolder}/compile/**/*.js"] | |
15 | + // "args": ["--experimental-modules", "--loader", "./loader.mjs"] | |
16 | + }, | |
17 | + // 调试开发环境脚本 | |
18 | + { | |
19 | + "type": "node", | |
20 | + "request": "launch", | |
21 | + "name": "dev", | |
22 | + // "stopOnEntry": true, | |
23 | + "cwd": "${workspaceFolder}", | |
24 | + "program": "${workspaceFolder}/node_modules/@vue/cli-service/bin/vue-cli-service.js", | |
25 | + "args": ["serve", "--open"] | |
26 | + }, | |
27 | + // 调试生产环境脚本 | |
28 | + { | |
29 | + "type": "node", | |
30 | + "request": "launch", | |
31 | + "name": "build", | |
32 | + // "stopOnEntry": true, | |
33 | + "cwd": "${workspaceFolder}", | |
34 | + "program": "${workspaceFolder}/node_modules/@vue/cli-service/bin/vue-cli-service.js", | |
35 | + "args": ["build"] | |
36 | + }, | |
37 | + // 调试单元测试脚本 | |
38 | + { | |
39 | + "type": "node", | |
40 | + "request": "launch", | |
41 | + "name": "test:unit", | |
42 | + // "stopOnEntry": true, | |
43 | + "cwd": "${workspaceFolder}", | |
44 | + "program": "${workspaceFolder}/node_modules/@vue/cli-service/bin/vue-cli-service.js", | |
45 | + "args": ["test:unit", "--detectOpenHandles"] | |
46 | + } | |
47 | + ] | |
48 | +} | ... | ... |
.vscode/settings.json
0 → 100644
1 | +{ | |
2 | + "typescript.tsdk": "./node_modules/typescript/lib", | |
3 | + //=========================================== | |
4 | + //============= Editor ====================== | |
5 | + //=========================================== | |
6 | + "explorer.openEditors.visible": 0, | |
7 | + "editor.minimap.renderCharacters": false, | |
8 | + "editor.minimap.maxColumn": 300, | |
9 | + "editor.minimap.showSlider": "always", | |
10 | + "editor.smoothScrolling": true, | |
11 | + "editor.cursorBlinking": "phase", | |
12 | + "editor.cursorSmoothCaretAnimation": true, | |
13 | + "editor.detectIndentation": false, // vscode默认启用了根据文件类型自动设置tabsize的选项 | |
14 | + "diffEditor.ignoreTrimWhitespace": false, | |
15 | + "editor.formatOnPaste": true, //自动格式化粘贴的内容 | |
16 | + "editor.formatOnSave": true, //保存自动格式化 | |
17 | + "editor.suggestSelection": "first", | |
18 | + "editor.trimAutoWhitespace": true, | |
19 | + "editor.quickSuggestions": { | |
20 | + // 快速提示 | |
21 | + "other": true, | |
22 | + "comments": true, | |
23 | + "strings": true | |
24 | + }, | |
25 | + //=========================================== | |
26 | + //============= Other ======================= | |
27 | + //=========================================== | |
28 | + "breadcrumbs.enabled": true, // 启用/禁用导航路径 | |
29 | + "open-in-browser.default": "chrome", // 默认浏览器 | |
30 | + //=========================================== | |
31 | + //============= emmet ======================= | |
32 | + //=========================================== | |
33 | + "emmet.triggerExpansionOnTab": true, // 配置emmet是否启用tab展开缩写 | |
34 | + "emmet.showAbbreviationSuggestions": true, | |
35 | + "emmet.showExpandedAbbreviation": "always", | |
36 | + "emmet.syntaxProfiles": { | |
37 | + // 配置emmet对文件类型的支持,比如vue后缀文件按照html文件来进行emmet扩写 | |
38 | + "vue-html": "html", | |
39 | + "vue": "html", | |
40 | + "javascript": "javascriptreact", | |
41 | + // xml类型文件默认都是单引号,开启对非单引号的emmet识别 | |
42 | + "xml": { | |
43 | + "attr_quotes": "single" | |
44 | + } | |
45 | + }, | |
46 | + "emmet.includeLanguages": { | |
47 | + // 在react的jsx中添加对emmet的支持 | |
48 | + "jsx-sublime-babel-tags": "javascriptreact" | |
49 | + }, | |
50 | + //=========================================== | |
51 | + //============= files ======================= | |
52 | + //=========================================== | |
53 | + // "files.autoSave": "onWindowChange", // 窗口失去焦点自动保存 | |
54 | + // "files.autoSaveDelay": 1000, // 自动保存时间 | |
55 | + "files.trimTrailingWhitespace": true, // 启用后,将在保存文件时剪裁尾随空格。 | |
56 | + // 文件末尾插入新行 | |
57 | + "files.insertFinalNewline": true, | |
58 | + // 删除文件末尾多余的新行 | |
59 | + "files.trimFinalNewlines": true, | |
60 | + "files.eol": "\n", | |
61 | + "search.exclude": { | |
62 | + // 搜索排除这些区域 | |
63 | + "**/node_modules": true, | |
64 | + "**/*.log": true, | |
65 | + "**/*.log*": true, | |
66 | + "**/bower_components": true, | |
67 | + "**/dist": true, | |
68 | + "**/elehukouben": true, | |
69 | + "**/.git": true, | |
70 | + "**/.gitignore": true, | |
71 | + "**/.svn": true, | |
72 | + "**/.DS_Store": true, | |
73 | + "**/.idea": true, | |
74 | + "**/.vscode": false, | |
75 | + "**/yarn.lock": true, | |
76 | + "**/tmp": true | |
77 | + }, | |
78 | + "files.exclude": { | |
79 | + // 排除文件搜索区域,比如node_modules(默认设置已经屏蔽了) | |
80 | + // "**/node_modules": true, | |
81 | + "**/bower_components": true, | |
82 | + "**/.idea": true, | |
83 | + "**/yarn.lock": true, | |
84 | + "**/tmp": true, | |
85 | + "**/.git": true, | |
86 | + "**/.svn": true, | |
87 | + "**/.hg": true, | |
88 | + "**/CVS": true, | |
89 | + "**/.DS_Store": true | |
90 | + }, | |
91 | + "files.watcherExclude": { | |
92 | + // 文件监视排除 | |
93 | + "**/.git/objects/**": true, | |
94 | + "**/.git/subtree-cache/**": true, | |
95 | + "**/.vscode/**": true, | |
96 | + "**/node_modules/**": true, | |
97 | + "**/tmp/**": true, | |
98 | + "**/bower_components/**": true, | |
99 | + "**/dist/**": true, | |
100 | + "**/yarn.lock": true | |
101 | + }, | |
102 | + "files.associations": { | |
103 | + // 配置文件关联,以便启用对应的智能提示,比如wxss使用css | |
104 | + "*.vue": "vue", | |
105 | + "*.wxss": "css" | |
106 | + }, | |
107 | + "stylelint.enable": true, | |
108 | + "stylelint.packageManager": "yarn", | |
109 | + "css.validate": true, | |
110 | + "less.validate": true, | |
111 | + "scss.validate": true, | |
112 | + // ↓↓↓↓↓↓↓↓↓↓↓↓↓ 以下为插件设置 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ | |
113 | + // ↓↓↓↓↓↓↓↓↓↓↓↓↓ 需要安装对应的插件 ↓↓↓↓↓↓↓↓↓↓↓↓ | |
114 | + // ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ | |
115 | + // =========================================== | |
116 | + // ================ Eslint =================== | |
117 | + // =========================================== | |
118 | + "eslint.enable": true, // 是否开启eslint | |
119 | + | |
120 | + "eslint.options": { | |
121 | + // 配置 | |
122 | + "plugins": ["html", "vue", "javascript", "jsx", "typescript"] | |
123 | + }, | |
124 | + "eslint.autoFixOnSave": true, // 保存自动格式化 | |
125 | + // =========================================== | |
126 | + // ================ Vetur ==================== | |
127 | + // =========================================== | |
128 | + "vetur.format.options.tabSize": 2, | |
129 | + "vetur.format.defaultFormatter.html": "js-beautify-html", // 使用js-beautify-html格式化 | |
130 | + "vetur.format.defaultFormatter.scss": "prettier", // 使用js-beautify-html格式化 | |
131 | + "vetur.format.defaultFormatter.css": "prettier", // 使用js-beautify-html格式化 | |
132 | + // "vetur.format.defaultFormatter.html": "prettyhtml", | |
133 | + "vetur.format.defaultFormatter.js": "prettier", | |
134 | + // "vetur.useWorkspaceDependencies": true, | |
135 | + "vetur.format.defaultFormatterOptions": { | |
136 | + "js-beautify-html": { | |
137 | + // "wrap_attributes": "force-aligned", // 单行 | |
138 | + "wrap_attributes": "force-expand-multiline" // 属性强制折行对齐 多行 | |
139 | + }, | |
140 | + "prettier": { | |
141 | + "eslintIntegration": true, // 让perttier使用eslint的格式进行检查 | |
142 | + "arrowParens": "always", // 箭头函数参数括号 默认avoid 可选 avoid | always | |
143 | + "semi": false, // 使用分号, 默认true | |
144 | + "singleQuote": true // 使用单引号, 默认false(在jsx中配置无效, 默认都是双引号) | |
145 | + } | |
146 | + }, | |
147 | + // =========================================== | |
148 | + // ============= Material Icon Theme ========= | |
149 | + // =========================================== | |
150 | + "workbench.iconTheme": "material-icon-theme", // 主题色 | |
151 | + // =========================================== | |
152 | + // ============= stylus Supremacy ============ | |
153 | + // =========================================== | |
154 | + "stylusSupremacy.insertColons": false, // 是否插入冒号 | |
155 | + "stylusSupremacy.insertSemicolons": false, // 是否插入分号 | |
156 | + "stylusSupremacy.insertBraces": false, // 是否插入大括号 | |
157 | + //=========================================== | |
158 | + //============= koroFileHeaders =============== | |
159 | + //=========================================== | |
160 | + "fileheader.configObj": { | |
161 | + "autoAdd": false // 将该选项设置为true即可开启 | |
162 | + }, | |
163 | + // 函数注释 | |
164 | + //=========================================== | |
165 | + //============= Code Runner ================= | |
166 | + //=========================================== | |
167 | + "javascript.updateImportsOnFileMove.enabled": "never", | |
168 | + "liveServer.settings.donotShowInfoMsg": true, | |
169 | + "[javascript]": { | |
170 | + "editor.defaultFormatter": "esbenp.prettier-vscode" | |
171 | + }, | |
172 | + "terminal.integrated.rendererType": "dom", //关闭liveserver提示 | |
173 | + "telemetry.enableCrashReporter": false, | |
174 | + "telemetry.enableTelemetry": false, | |
175 | + "workbench.settings.enableNaturalLanguageSearch": false, | |
176 | + // 引用路径设置 | |
177 | + "path-intellisense.mappings": { | |
178 | + "/@/": "${workspaceRoot}/src" | |
179 | + }, | |
180 | + "prettier.requireConfig": true, | |
181 | + "typescript.updateImportsOnFileMove.enabled": "always", | |
182 | + "workbench.sideBar.location": "left", | |
183 | + "cSpell.enabledLanguageIds": [ | |
184 | + "asciidoc", | |
185 | + "c", | |
186 | + "cpp", | |
187 | + "csharp", | |
188 | + "css", | |
189 | + "git-commit", | |
190 | + "go", | |
191 | + "handlebars", | |
192 | + "haskell", | |
193 | + "html", | |
194 | + "jade", | |
195 | + "java", | |
196 | + "javascript", | |
197 | + "javascriptreact", | |
198 | + "json", | |
199 | + "jsonc", | |
200 | + "latex", | |
201 | + "less", | |
202 | + "markdown", | |
203 | + "php", | |
204 | + "plaintext", | |
205 | + "pug", | |
206 | + "python", | |
207 | + "restructuredtext", | |
208 | + "rust", | |
209 | + "scala", | |
210 | + "scss", | |
211 | + "text", | |
212 | + "typescript", | |
213 | + "typescriptreact", | |
214 | + "yaml", | |
215 | + "yml" | |
216 | + ], | |
217 | + "[javascriptreact]": { | |
218 | + "editor.defaultFormatter": "esbenp.prettier-vscode" | |
219 | + }, | |
220 | + "[typescript]": { | |
221 | + "editor.defaultFormatter": "esbenp.prettier-vscode" | |
222 | + }, | |
223 | + "[typescriptreact]": { | |
224 | + "editor.defaultFormatter": "esbenp.prettier-vscode" | |
225 | + }, | |
226 | + "[json]": { | |
227 | + "editor.defaultFormatter": "esbenp.prettier-vscode" | |
228 | + }, | |
229 | + "[jsonc]": { | |
230 | + "editor.defaultFormatter": "vscode.json-language-features" | |
231 | + }, | |
232 | + "[html]": { | |
233 | + "editor.defaultFormatter": "esbenp.prettier-vscode" | |
234 | + }, | |
235 | + "[css]": { | |
236 | + "editor.defaultFormatter": "esbenp.prettier-vscode" | |
237 | + }, | |
238 | + "[less]": { | |
239 | + "editor.defaultFormatter": "esbenp.prettier-vscode" | |
240 | + }, | |
241 | + "[scss]": { | |
242 | + "editor.defaultFormatter": "esbenp.prettier-vscode" | |
243 | + }, | |
244 | + "[markdown]": { | |
245 | + "editor.defaultFormatter": "esbenp.prettier-vscode" | |
246 | + }, | |
247 | + "cSpell.words": ["yfboilerplate"], | |
248 | + "editor.codeActionsOnSave": { | |
249 | + "source.fixAll.eslint": true | |
250 | + } | |
251 | +} | ... | ... |