Commit ·
dc649b1
0
Parent(s):
chore: HuggingFace deploy 2026-05-19 10:37
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .browserslistrc +4 -0
- .changeset/README.md +5 -0
- .changeset/config.json +18 -0
- .commitlintrc.js +1 -0
- .dockerignore +7 -0
- .editorconfig +18 -0
- .gitattributes +9 -0
- .gitconfig +2 -0
- .github/CODEOWNERS +14 -0
- .github/ISSUE_TEMPLATE/bug-report.yml +74 -0
- .github/ISSUE_TEMPLATE/docs.yml +38 -0
- .github/ISSUE_TEMPLATE/feature-request.yml +70 -0
- .github/actions/setup-node/action.yml +40 -0
- .github/commit-convention.md +89 -0
- .github/config.yml +39 -0
- .github/contributing.md +42 -0
- .github/dependabot.yml +17 -0
- .github/pull_request_template.md +33 -0
- .github/release-drafter.yml +61 -0
- .github/semantic.yml +13 -0
- .github/workflows/build.yml +48 -0
- .github/workflows/changeset-version.yml +42 -0
- .github/workflows/ci.yml +125 -0
- .github/workflows/codeql.yml +94 -0
- .github/workflows/deploy.yml +155 -0
- .github/workflows/draft.yml +25 -0
- .github/workflows/issue-close-require.yml +31 -0
- .github/workflows/issue-labeled.yml +46 -0
- .github/workflows/lock.yml +24 -0
- .github/workflows/release-tag.yml +80 -0
- .github/workflows/semantic-pull-request.yml +41 -0
- .github/workflows/stale.yml +19 -0
- .gitignore +51 -0
- .gitpod.yml +6 -0
- .husky/commit-msg +6 -0
- .husky/post-merge +3 -0
- .husky/pre-commit +7 -0
- .lintstagedrc.mjs +20 -0
- .node-version +1 -0
- .npmrc +13 -0
- .prettierignore +18 -0
- .prettierrc.mjs +1 -0
- .stylelintignore +4 -0
- .vscode/extensions.json +30 -0
- .vscode/global.code-snippets +37 -0
- .vscode/launch.json +42 -0
- .vscode/settings.json +227 -0
- Dockerfile +36 -0
- LICENSE +9 -0
- README.ja-JP.md +153 -0
.browserslistrc
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
> 1%
|
| 2 |
+
last 2 versions
|
| 3 |
+
not dead
|
| 4 |
+
not ie 11
|
.changeset/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Changesets
|
| 2 |
+
|
| 3 |
+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with multi-package repos, or single-package repos to help you version and publish your code. You can find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
| 4 |
+
|
| 5 |
+
We have a quick list of common questions to get you started engaging with this project in [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
.changeset/config.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
|
| 3 |
+
"changelog": [
|
| 4 |
+
"@changesets/changelog-github",
|
| 5 |
+
{ "repo": "vbenjs/vue-vben-admin" }
|
| 6 |
+
],
|
| 7 |
+
"commit": false,
|
| 8 |
+
"fixed": [["@vben-core/*", "@vben/*"]],
|
| 9 |
+
"snapshot": {
|
| 10 |
+
"prereleaseTemplate": "{tag}-{datetime}"
|
| 11 |
+
},
|
| 12 |
+
"privatePackages": { "version": true, "tag": true },
|
| 13 |
+
"linked": [],
|
| 14 |
+
"access": "public",
|
| 15 |
+
"baseBranch": "main",
|
| 16 |
+
"updateInternalDependencies": "patch",
|
| 17 |
+
"ignore": []
|
| 18 |
+
}
|
.commitlintrc.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
export { default } from '@vben/commitlint-config';
|
.dockerignore
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
node_modules
|
| 2 |
+
.git
|
| 3 |
+
.gitignore
|
| 4 |
+
*.md
|
| 5 |
+
dist
|
| 6 |
+
.turbo
|
| 7 |
+
dist.zip
|
.editorconfig
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
root = true
|
| 2 |
+
|
| 3 |
+
[*]
|
| 4 |
+
charset=utf-8
|
| 5 |
+
end_of_line=lf
|
| 6 |
+
insert_final_newline=true
|
| 7 |
+
indent_style=space
|
| 8 |
+
indent_size=2
|
| 9 |
+
max_line_length = 100
|
| 10 |
+
trim_trailing_whitespace = true
|
| 11 |
+
quote_type = single
|
| 12 |
+
|
| 13 |
+
[*.{yml,yaml,json}]
|
| 14 |
+
indent_style = space
|
| 15 |
+
indent_size = 2
|
| 16 |
+
|
| 17 |
+
[*.md]
|
| 18 |
+
trim_trailing_whitespace = false
|
.gitattributes
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# https://docs.github.com/cn/get-started/getting-started-with-git/configuring-git-to-handle-line-endings
|
| 2 |
+
|
| 3 |
+
# Automatically normalize line endings (to LF) for all text-based files.
|
| 4 |
+
* text=auto eol=lf
|
| 5 |
+
# Declare files that will always have CRLF line endings on checkout.
|
| 6 |
+
*.{cmd,[cC][mM][dD]} text eol=crlf
|
| 7 |
+
*.{bat,[bB][aA][tT]} text eol=crlf
|
| 8 |
+
# Denote all files that are truly binary and should not be modified.
|
| 9 |
+
*.{ico,png,jpg,jpeg,gif,webp,svg,woff,woff2} binary
|
.gitconfig
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[core]
|
| 2 |
+
ignorecase = false
|
.github/CODEOWNERS
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# default onwer
|
| 2 |
+
* anncwb@126.com vince292007@gmail.com netfan@foxmail.com
|
| 3 |
+
|
| 4 |
+
# vben core onwer
|
| 5 |
+
/.github/ anncwb@126.com vince292007@gmail.com netfan@foxmail.com
|
| 6 |
+
/.vscode/ anncwb@126.com vince292007@gmail.com netfan@foxmail.com
|
| 7 |
+
/packages/ anncwb@126.com vince292007@gmail.com netfan@foxmail.com
|
| 8 |
+
/packages/@core/ anncwb@126.com vince292007@gmail.com netfan@foxmail.com
|
| 9 |
+
/internal/ anncwb@126.com vince292007@gmail.com netfan@foxmail.com
|
| 10 |
+
/scripts/ anncwb@126.com vince292007@gmail.com netfan@foxmail.com
|
| 11 |
+
|
| 12 |
+
# vben team onwer
|
| 13 |
+
apps/ anncwb@126.com vince292007@gmail.com netfan@foxmail.com @vbenjs/team-v5
|
| 14 |
+
docs/ anncwb@126.com vince292007@gmail.com netfan@foxmail.com @vbenjs/team-v5
|
.github/ISSUE_TEMPLATE/bug-report.yml
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: 🐞 Bug Report
|
| 2 |
+
description: Report an issue with Vben Admin to help us make it better.
|
| 3 |
+
title: 'Bug: '
|
| 4 |
+
labels: ['bug: pending triage']
|
| 5 |
+
|
| 6 |
+
body:
|
| 7 |
+
- type: markdown
|
| 8 |
+
attributes:
|
| 9 |
+
value: |
|
| 10 |
+
Thanks for taking the time to fill out this bug report!
|
| 11 |
+
- type: dropdown
|
| 12 |
+
id: version
|
| 13 |
+
attributes:
|
| 14 |
+
label: Version
|
| 15 |
+
description: What version of our software are you running?
|
| 16 |
+
options:
|
| 17 |
+
- Vben Admin V5
|
| 18 |
+
- Vben Admin V2
|
| 19 |
+
default: 0
|
| 20 |
+
validations:
|
| 21 |
+
required: true
|
| 22 |
+
|
| 23 |
+
- type: textarea
|
| 24 |
+
id: bug-desc
|
| 25 |
+
attributes:
|
| 26 |
+
label: Describe the bug?
|
| 27 |
+
description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks!
|
| 28 |
+
placeholder: Bug Description
|
| 29 |
+
validations:
|
| 30 |
+
required: true
|
| 31 |
+
|
| 32 |
+
- type: textarea
|
| 33 |
+
id: reproduction
|
| 34 |
+
attributes:
|
| 35 |
+
label: Reproduction
|
| 36 |
+
description: Please provide a link to [StackBlitz](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/basic?initialPath=__vitest__/) (you can also use [examples](https://github.com/vitest-dev/vitest/tree/main/examples)) or a github repo that can reproduce the problem you ran into. A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required unless you are absolutely sure that the issue is obvious and the provided information is enough to understand the problem. If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "needs reproduction" label. If no reproduction is provided after 3 days, it will be auto-closed.
|
| 37 |
+
placeholder: Reproduction
|
| 38 |
+
validations:
|
| 39 |
+
required: true
|
| 40 |
+
|
| 41 |
+
- type: textarea
|
| 42 |
+
id: system-info
|
| 43 |
+
attributes:
|
| 44 |
+
label: System Info
|
| 45 |
+
description: Output of `npx envinfo --system --npmPackages '{vue}' --binaries --browsers`
|
| 46 |
+
render: shell
|
| 47 |
+
placeholder: System, Binaries, Browsers
|
| 48 |
+
validations:
|
| 49 |
+
required: true
|
| 50 |
+
|
| 51 |
+
- type: textarea
|
| 52 |
+
id: logs
|
| 53 |
+
attributes:
|
| 54 |
+
label: Relevant log output
|
| 55 |
+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
| 56 |
+
render: shell
|
| 57 |
+
|
| 58 |
+
- type: checkboxes
|
| 59 |
+
id: terms
|
| 60 |
+
attributes:
|
| 61 |
+
label: Validations
|
| 62 |
+
description: Before submitting the issue, please make sure you do the following
|
| 63 |
+
# description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com).
|
| 64 |
+
options:
|
| 65 |
+
- label: Read the [docs](https://doc.vben.pro/)
|
| 66 |
+
required: true
|
| 67 |
+
- label: Ensure the code is up to date. (Some issues have been fixed in the latest version)
|
| 68 |
+
required: true
|
| 69 |
+
- label: I have searched the [existing issues](https://github.com/vbenjs/vue-vben-admin/issues) and checked that my issue does not duplicate any existing issues.
|
| 70 |
+
required: true
|
| 71 |
+
- label: Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vbenjs/vue-vben-admin/discussions) or join our [Discord Chat Server](https://discord.gg/8GuAdwDhj6).
|
| 72 |
+
required: true
|
| 73 |
+
- label: The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
|
| 74 |
+
required: true
|
.github/ISSUE_TEMPLATE/docs.yml
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: 📚 Documentation
|
| 2 |
+
description: Report an issue with Vben Admin Website to help us make it better.
|
| 3 |
+
title: 'Docs: '
|
| 4 |
+
labels: [documentation]
|
| 5 |
+
body:
|
| 6 |
+
- type: markdown
|
| 7 |
+
attributes:
|
| 8 |
+
value: |
|
| 9 |
+
Thanks for taking the time to fill out this issue!
|
| 10 |
+
- type: checkboxes
|
| 11 |
+
id: documentation_is
|
| 12 |
+
attributes:
|
| 13 |
+
label: Documentation is
|
| 14 |
+
options:
|
| 15 |
+
- label: Missing
|
| 16 |
+
- label: Outdated
|
| 17 |
+
- label: Confusing
|
| 18 |
+
- label: Not sure?
|
| 19 |
+
- type: textarea
|
| 20 |
+
id: description
|
| 21 |
+
attributes:
|
| 22 |
+
label: Explain in Detail
|
| 23 |
+
description: A clear and concise description of your suggestion. If you intend to submit a PR for this issue, tell us in the description. Thanks!
|
| 24 |
+
placeholder: The description of ... page is not clear. I thought it meant ... but it wasn't.
|
| 25 |
+
validations:
|
| 26 |
+
required: true
|
| 27 |
+
- type: textarea
|
| 28 |
+
id: suggestion
|
| 29 |
+
attributes:
|
| 30 |
+
label: Your Suggestion for Changes
|
| 31 |
+
validations:
|
| 32 |
+
required: true
|
| 33 |
+
- type: textarea
|
| 34 |
+
id: reproduction-steps
|
| 35 |
+
attributes:
|
| 36 |
+
label: Steps to reproduce
|
| 37 |
+
description: Please provide any reproduction steps that may need to be described. E.g. if it happens only when running the dev or build script make sure it's clear which one to use.
|
| 38 |
+
placeholder: Run `pnpm install` followed by `pnpm run docs:dev`
|
.github/ISSUE_TEMPLATE/feature-request.yml
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: ✨ New Feature Proposal
|
| 2 |
+
description: Propose a new feature to be added to Vben Admin
|
| 3 |
+
title: 'FEATURE: '
|
| 4 |
+
labels: ['enhancement: pending triage']
|
| 5 |
+
body:
|
| 6 |
+
- type: markdown
|
| 7 |
+
attributes:
|
| 8 |
+
value: |
|
| 9 |
+
Thank you for suggesting a feature for our project! Please fill out the information below to help us understand and implement your request!
|
| 10 |
+
- type: dropdown
|
| 11 |
+
id: version
|
| 12 |
+
attributes:
|
| 13 |
+
label: Version
|
| 14 |
+
description: What version of our software are you running?
|
| 15 |
+
options:
|
| 16 |
+
- Vben Admin V5
|
| 17 |
+
- Vben Admin V2
|
| 18 |
+
default: 0
|
| 19 |
+
validations:
|
| 20 |
+
required: true
|
| 21 |
+
|
| 22 |
+
- type: textarea
|
| 23 |
+
id: description
|
| 24 |
+
attributes:
|
| 25 |
+
label: Description
|
| 26 |
+
description: A detailed description of the feature request.
|
| 27 |
+
placeholder: Please describe the feature you would like to see, and why it would be useful.
|
| 28 |
+
validations:
|
| 29 |
+
required: true
|
| 30 |
+
|
| 31 |
+
- type: textarea
|
| 32 |
+
id: proposed-solution
|
| 33 |
+
attributes:
|
| 34 |
+
label: Proposed Solution
|
| 35 |
+
description: A clear and concise description of what you want to happen.
|
| 36 |
+
placeholder: Describe the solution you'd like to see
|
| 37 |
+
validations:
|
| 38 |
+
required: true
|
| 39 |
+
|
| 40 |
+
- type: textarea
|
| 41 |
+
id: alternatives
|
| 42 |
+
attributes:
|
| 43 |
+
label: Alternatives Considered
|
| 44 |
+
description: |
|
| 45 |
+
A clear and concise description of any alternative solutions or features you've considered.
|
| 46 |
+
placeholder: Describe any alternative solutions or features you've considered
|
| 47 |
+
validations:
|
| 48 |
+
required: false
|
| 49 |
+
|
| 50 |
+
- type: input
|
| 51 |
+
id: additional-context
|
| 52 |
+
attributes:
|
| 53 |
+
label: Additional Context
|
| 54 |
+
description: Add any other context or screenshots about the feature request here.
|
| 55 |
+
placeholder: Any additional information
|
| 56 |
+
validations:
|
| 57 |
+
required: false
|
| 58 |
+
|
| 59 |
+
- type: checkboxes
|
| 60 |
+
id: checkboxes
|
| 61 |
+
attributes:
|
| 62 |
+
label: Validations
|
| 63 |
+
description: Before submitting the issue, please make sure you do the following
|
| 64 |
+
options:
|
| 65 |
+
- label: Read the [docs](https://doc.vben.pro/)
|
| 66 |
+
required: true
|
| 67 |
+
- label: Ensure the code is up to date. (Some issues have been fixed in the latest version)
|
| 68 |
+
required: true
|
| 69 |
+
- label: I have searched the [existing issues](https://github.com/vbenjs/vue-vben-admin/issues) and checked that my issue does not duplicate any existing issues.
|
| 70 |
+
required: true
|
.github/actions/setup-node/action.yml
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: 'Setup Node'
|
| 2 |
+
|
| 3 |
+
description: 'Setup node and pnpm'
|
| 4 |
+
|
| 5 |
+
runs:
|
| 6 |
+
using: 'composite'
|
| 7 |
+
steps:
|
| 8 |
+
- name: Install pnpm
|
| 9 |
+
uses: pnpm/action-setup@v4
|
| 10 |
+
|
| 11 |
+
- name: Install Node.js
|
| 12 |
+
uses: actions/setup-node@v4
|
| 13 |
+
with:
|
| 14 |
+
node-version-file: .node-version
|
| 15 |
+
cache: 'pnpm'
|
| 16 |
+
|
| 17 |
+
- name: Get pnpm store directory
|
| 18 |
+
shell: bash
|
| 19 |
+
run: |
|
| 20 |
+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
| 21 |
+
|
| 22 |
+
- uses: actions/cache@v4
|
| 23 |
+
name: Setup pnpm cache
|
| 24 |
+
if: ${{ github.ref_name == 'main' }}
|
| 25 |
+
with:
|
| 26 |
+
path: ${{ env.STORE_PATH }}
|
| 27 |
+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
| 28 |
+
restore-keys: |
|
| 29 |
+
${{ runner.os }}-pnpm-store-
|
| 30 |
+
|
| 31 |
+
- uses: actions/cache/restore@v4
|
| 32 |
+
if: ${{ github.ref_name != 'main' }}
|
| 33 |
+
with:
|
| 34 |
+
path: ${{ env.STORE_PATH }}
|
| 35 |
+
key: |
|
| 36 |
+
${{ runner.os }}-pnpm-store-
|
| 37 |
+
|
| 38 |
+
- name: Install dependencies
|
| 39 |
+
shell: bash
|
| 40 |
+
run: pnpm install --frozen-lockfile
|
.github/commit-convention.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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/config.yml
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Prevent issues being created without using the template
|
| 2 |
+
blank_issues_enabled: false
|
| 3 |
+
checkIssueTemplate: true
|
| 4 |
+
checkPullRequestTemplate: true
|
| 5 |
+
|
| 6 |
+
contact_links:
|
| 7 |
+
- name: 💬 Discord Chat
|
| 8 |
+
url: https://discord.gg/8GuAdwDhj6
|
| 9 |
+
about: Ask questions and discuss with other Vben users in real time.
|
| 10 |
+
|
| 11 |
+
- name: ❓ Questions & Discussions
|
| 12 |
+
url: https://github.com/@vbenjs/vue-vben-admin/discussions
|
| 13 |
+
about: Use GitHub discussions for message-board style questions and discussions.
|
| 14 |
+
|
| 15 |
+
# Comment to be posted to on PRs from first time contributors in your repository
|
| 16 |
+
newPRWelcomeComment: |
|
| 17 |
+
💖 Thanks for opening this pull request! 💖
|
| 18 |
+
Please be patient and we will get back to you as soon as we can.
|
| 19 |
+
|
| 20 |
+
# Comment to be posted to on pull requests merged by a first time user
|
| 21 |
+
firstPRMergeComment: >
|
| 22 |
+
Thanks for your contribution! 🎉🎉🎉
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
# Comment to be posted to on first time issues
|
| 26 |
+
newIssueWelcomeComment: >
|
| 27 |
+
Thanks for opening your first issue! Be sure to follow the issue template and provide every bit of information to help the developers!
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
# *OPTIONAL* default titles to check against for lack of descriptiveness
|
| 31 |
+
# MUST BE ALL LOWERCASE
|
| 32 |
+
requestInfoDefaultTitles:
|
| 33 |
+
- update readme.md
|
| 34 |
+
- updates
|
| 35 |
+
|
| 36 |
+
# *Required* Comment to reply with
|
| 37 |
+
requestInfoReplyComment: >
|
| 38 |
+
Thanks for filing this issue/PR! It would be much appreciated if you could provide us with more information so we can effectively analyze the situation in context.
|
| 39 |
+
|
.github/contributing.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Vben Admin Contributing Guide
|
| 2 |
+
|
| 3 |
+
Hi! We're really excited that you are interested in contributing to Vben Admin. Before submitting your contribution, please make sure to take a moment and read through the following guidelines:
|
| 4 |
+
|
| 5 |
+
- [Pull Request Guidelines](#pull-request-guidelines)
|
| 6 |
+
|
| 7 |
+
## Contributor Code of Conduct
|
| 8 |
+
|
| 9 |
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
| 10 |
+
|
| 11 |
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of the level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
| 12 |
+
|
| 13 |
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
| 14 |
+
|
| 15 |
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
| 16 |
+
|
| 17 |
+
## Pull Request Guidelines
|
| 18 |
+
|
| 19 |
+
- Checkout a topic branch from the relevant branch, e.g. main, and merge back against that branch.
|
| 20 |
+
|
| 21 |
+
- If adding a new feature:
|
| 22 |
+
|
| 23 |
+
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
|
| 24 |
+
|
| 25 |
+
- If fixing bug:
|
| 26 |
+
|
| 27 |
+
- Provide a detailed description of the bug in the PR. Live demo preferred.
|
| 28 |
+
|
| 29 |
+
- It's OK to have multiple small commits as you work on the PR - GitHub can automatically squash them before merging.
|
| 30 |
+
|
| 31 |
+
## Development Setup
|
| 32 |
+
|
| 33 |
+
You will need [pnpm](https://pnpm.io/)
|
| 34 |
+
|
| 35 |
+
After cloning the repo, run:
|
| 36 |
+
|
| 37 |
+
```bash
|
| 38 |
+
# install the dependencies of the project
|
| 39 |
+
$ pnpm install
|
| 40 |
+
# start the project
|
| 41 |
+
$ pnpm run dev
|
| 42 |
+
```
|
.github/dependabot.yml
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: 2
|
| 2 |
+
updates:
|
| 3 |
+
- package-ecosystem: npm
|
| 4 |
+
directory: '/'
|
| 5 |
+
schedule:
|
| 6 |
+
interval: daily
|
| 7 |
+
groups:
|
| 8 |
+
non-breaking-changes:
|
| 9 |
+
update-types: [minor, patch]
|
| 10 |
+
|
| 11 |
+
- package-ecosystem: github-actions
|
| 12 |
+
directory: '/'
|
| 13 |
+
schedule:
|
| 14 |
+
interval: weekly
|
| 15 |
+
groups:
|
| 16 |
+
non-breaking-changes:
|
| 17 |
+
update-types: [minor, patch]
|
.github/pull_request_template.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## Description
|
| 2 |
+
|
| 3 |
+
<!-- Please describe the change as necessary. If it's a feature or enhancement please be as detailed as possible. If it's a bug fix, please link the issue that it fixes or describe the bug in as much detail.
|
| 4 |
+
|
| 5 |
+
-->
|
| 6 |
+
|
| 7 |
+
<!-- You can also add additional context here -->
|
| 8 |
+
|
| 9 |
+
## Type of change
|
| 10 |
+
|
| 11 |
+
Please delete options that are not relevant.
|
| 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 |
+
- [ ] Please, don't make changes to `pnpm-lock.yaml` unless you introduce a new test example.
|
| 18 |
+
|
| 19 |
+
## Checklist
|
| 20 |
+
|
| 21 |
+
> ℹ️ Check all checkboxes - this will indicate that you have done everything in accordance with the rules in [CONTRIBUTING](contributing.md).
|
| 22 |
+
|
| 23 |
+
- [ ] If you introduce new functionality, document it. You can run documentation with `pnpm run docs:dev` command.
|
| 24 |
+
- [ ] Run the tests with `pnpm test`.
|
| 25 |
+
- [ ] Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with `feat:`, `fix:`, `perf:`, `docs:`, or `chore:`.
|
| 26 |
+
- [ ] My code follows the style guidelines of this project
|
| 27 |
+
- [ ] I have performed a self-review of my own code
|
| 28 |
+
- [ ] I have commented my code, particularly in hard-to-understand areas
|
| 29 |
+
- [ ] I have made corresponding changes to the documentation
|
| 30 |
+
- [ ] My changes generate no new warnings
|
| 31 |
+
- [ ] I have added tests that prove my fix is effective or that my feature works
|
| 32 |
+
- [ ] New and existing unit tests pass locally with my changes
|
| 33 |
+
- [ ] Any dependent changes have been merged and published in downstream modules
|
.github/release-drafter.yml
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name-template: 'v$RESOLVED_VERSION'
|
| 2 |
+
tag-template: 'v$RESOLVED_VERSION'
|
| 3 |
+
version-template: $MAJOR.$MINOR.$PATCH
|
| 4 |
+
change-template: '* $TITLE (#$NUMBER) @$AUTHOR'
|
| 5 |
+
template: |
|
| 6 |
+
# What's Changed
|
| 7 |
+
|
| 8 |
+
$CHANGES
|
| 9 |
+
|
| 10 |
+
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
|
| 11 |
+
|
| 12 |
+
categories:
|
| 13 |
+
- title: '🚀 Features'
|
| 14 |
+
labels:
|
| 15 |
+
- 'feature'
|
| 16 |
+
- title: '🐞 Bug Fixes'
|
| 17 |
+
labels:
|
| 18 |
+
- 'bug'
|
| 19 |
+
- title: '📈 Performance & Enhancement'
|
| 20 |
+
labels:
|
| 21 |
+
- 'perf'
|
| 22 |
+
- 'enhancement'
|
| 23 |
+
- title: 📝 Documentation
|
| 24 |
+
labels:
|
| 25 |
+
- 'documentation'
|
| 26 |
+
- title: 👻 Maintenance
|
| 27 |
+
labels:
|
| 28 |
+
- 'chore'
|
| 29 |
+
- 'dependencies'
|
| 30 |
+
# collapse-after: 12
|
| 31 |
+
- title: 🚦 Tests
|
| 32 |
+
labels:
|
| 33 |
+
- 'tests'
|
| 34 |
+
- title: 'Breaking'
|
| 35 |
+
label: 'breaking'
|
| 36 |
+
|
| 37 |
+
version-resolver:
|
| 38 |
+
major:
|
| 39 |
+
labels:
|
| 40 |
+
- 'major'
|
| 41 |
+
- 'breaking'
|
| 42 |
+
minor:
|
| 43 |
+
labels:
|
| 44 |
+
- 'minor'
|
| 45 |
+
patch:
|
| 46 |
+
labels:
|
| 47 |
+
- 'feature'
|
| 48 |
+
- 'patch'
|
| 49 |
+
- 'bug'
|
| 50 |
+
- 'maintenance'
|
| 51 |
+
- 'docs'
|
| 52 |
+
- 'dependencies'
|
| 53 |
+
- 'security'
|
| 54 |
+
|
| 55 |
+
exclude-labels:
|
| 56 |
+
- 'skip-changelog'
|
| 57 |
+
- 'no-changelog'
|
| 58 |
+
- 'changelog'
|
| 59 |
+
- 'bump versions'
|
| 60 |
+
- 'reverted'
|
| 61 |
+
- 'invalid'
|
.github/semantic.yml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
titleAndCommits: true
|
| 2 |
+
types:
|
| 3 |
+
- feat
|
| 4 |
+
- fix
|
| 5 |
+
- docs
|
| 6 |
+
- chore
|
| 7 |
+
- style
|
| 8 |
+
- refactor
|
| 9 |
+
- perf
|
| 10 |
+
- test
|
| 11 |
+
- build
|
| 12 |
+
- ci
|
| 13 |
+
- revert
|
.github/workflows/build.yml
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# name: Dependabot post-update
|
| 2 |
+
name: Build detection
|
| 3 |
+
on:
|
| 4 |
+
pull_request_target:
|
| 5 |
+
types: [opened, synchronize, reopened]
|
| 6 |
+
branches:
|
| 7 |
+
- main
|
| 8 |
+
|
| 9 |
+
env:
|
| 10 |
+
HUSKY: '0'
|
| 11 |
+
|
| 12 |
+
concurrency:
|
| 13 |
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
| 14 |
+
cancel-in-progress: true
|
| 15 |
+
|
| 16 |
+
permissions:
|
| 17 |
+
contents: read
|
| 18 |
+
pull-requests: write
|
| 19 |
+
|
| 20 |
+
jobs:
|
| 21 |
+
post-update:
|
| 22 |
+
if: github.repository == 'vbenjs/vue-vben-admin'
|
| 23 |
+
# if: ${{ github.actor == 'dependabot[bot]' }}
|
| 24 |
+
runs-on: ${{ matrix.os }}
|
| 25 |
+
strategy:
|
| 26 |
+
matrix:
|
| 27 |
+
os:
|
| 28 |
+
- ubuntu-latest
|
| 29 |
+
# - macos-latest
|
| 30 |
+
- windows-latest
|
| 31 |
+
steps:
|
| 32 |
+
- name: Checkout code
|
| 33 |
+
uses: actions/checkout@v4
|
| 34 |
+
with:
|
| 35 |
+
fetch-depth: 0
|
| 36 |
+
|
| 37 |
+
- name: Checkout out pull request
|
| 38 |
+
env:
|
| 39 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 40 |
+
run: |
|
| 41 |
+
gh pr checkout ${{ github.event.pull_request.number }}
|
| 42 |
+
|
| 43 |
+
- name: Setup Node
|
| 44 |
+
uses: ./.github/actions/setup-node
|
| 45 |
+
|
| 46 |
+
- name: Build
|
| 47 |
+
run: |
|
| 48 |
+
pnpm run build
|
.github/workflows/changeset-version.yml
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# https://github.com/changesets/action
|
| 2 |
+
name: Changeset version
|
| 3 |
+
|
| 4 |
+
on:
|
| 5 |
+
workflow_dispatch:
|
| 6 |
+
pull_request:
|
| 7 |
+
types:
|
| 8 |
+
- closed
|
| 9 |
+
branches:
|
| 10 |
+
- main
|
| 11 |
+
|
| 12 |
+
permissions:
|
| 13 |
+
pull-requests: write
|
| 14 |
+
contents: write
|
| 15 |
+
|
| 16 |
+
env:
|
| 17 |
+
CI: true
|
| 18 |
+
|
| 19 |
+
jobs:
|
| 20 |
+
version:
|
| 21 |
+
if: (github.event.pull_request.merged || github.event_name == 'workflow_dispatch') && github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, '[skip ci]') && github.repository == 'vbenjs/vue-vben-admin'
|
| 22 |
+
# if: github.repository == 'vbenjs/vue-vben-admin'
|
| 23 |
+
timeout-minutes: 15
|
| 24 |
+
runs-on: ubuntu-latest
|
| 25 |
+
|
| 26 |
+
steps:
|
| 27 |
+
- name: Checkout code
|
| 28 |
+
uses: actions/checkout@v4
|
| 29 |
+
with:
|
| 30 |
+
fetch-depth: 0
|
| 31 |
+
|
| 32 |
+
- name: Setup Node
|
| 33 |
+
uses: ./.github/actions/setup-node
|
| 34 |
+
|
| 35 |
+
- name: Create Release Pull Request
|
| 36 |
+
uses: changesets/action@v1
|
| 37 |
+
with:
|
| 38 |
+
version: pnpm run version
|
| 39 |
+
commit: 'chore: bump versions'
|
| 40 |
+
title: 'chore: bump versions'
|
| 41 |
+
env:
|
| 42 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
.github/workflows/ci.yml
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: CI
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
pull_request:
|
| 5 |
+
push:
|
| 6 |
+
branches:
|
| 7 |
+
- main
|
| 8 |
+
- 'releases/*'
|
| 9 |
+
|
| 10 |
+
permissions:
|
| 11 |
+
contents: read
|
| 12 |
+
|
| 13 |
+
env:
|
| 14 |
+
CI: true
|
| 15 |
+
TZ: Asia/Shanghai
|
| 16 |
+
|
| 17 |
+
jobs:
|
| 18 |
+
test:
|
| 19 |
+
name: Test
|
| 20 |
+
if: github.repository == 'vbenjs/vue-vben-admin'
|
| 21 |
+
runs-on: ${{ matrix.os }}
|
| 22 |
+
strategy:
|
| 23 |
+
matrix:
|
| 24 |
+
os:
|
| 25 |
+
- ubuntu-latest
|
| 26 |
+
# - macos-latest
|
| 27 |
+
- windows-latest
|
| 28 |
+
timeout-minutes: 20
|
| 29 |
+
steps:
|
| 30 |
+
- name: Checkout code
|
| 31 |
+
uses: actions/checkout@v4
|
| 32 |
+
with:
|
| 33 |
+
fetch-depth: 0
|
| 34 |
+
|
| 35 |
+
- name: Install pnpm
|
| 36 |
+
uses: pnpm/action-setup@v4
|
| 37 |
+
with:
|
| 38 |
+
run_install: false
|
| 39 |
+
|
| 40 |
+
- name: Setup Node
|
| 41 |
+
uses: ./.github/actions/setup-node
|
| 42 |
+
|
| 43 |
+
# - name: Check Git version
|
| 44 |
+
# run: git --version
|
| 45 |
+
|
| 46 |
+
# - name: Setup mock Git user
|
| 47 |
+
# run: git config --global user.email "you@example.com" && git config --global user.name "Your Name"
|
| 48 |
+
|
| 49 |
+
- name: Vitest tests
|
| 50 |
+
run: pnpm run test:unit
|
| 51 |
+
|
| 52 |
+
# - name: Upload coverage
|
| 53 |
+
# uses: codecov/codecov-action@v4
|
| 54 |
+
# with:
|
| 55 |
+
# token: ${{ secrets.CODECOV_TOKEN }}
|
| 56 |
+
|
| 57 |
+
lint:
|
| 58 |
+
name: Lint
|
| 59 |
+
if: github.repository == 'vbenjs/vue-vben-admin'
|
| 60 |
+
runs-on: ${{ matrix.os }}
|
| 61 |
+
strategy:
|
| 62 |
+
matrix:
|
| 63 |
+
os:
|
| 64 |
+
- ubuntu-latest
|
| 65 |
+
# - macos-latest
|
| 66 |
+
- windows-latest
|
| 67 |
+
|
| 68 |
+
steps:
|
| 69 |
+
- name: Checkout code
|
| 70 |
+
uses: actions/checkout@v4
|
| 71 |
+
with:
|
| 72 |
+
fetch-depth: 0
|
| 73 |
+
|
| 74 |
+
- name: Setup Node
|
| 75 |
+
uses: ./.github/actions/setup-node
|
| 76 |
+
|
| 77 |
+
- name: Lint
|
| 78 |
+
run: pnpm run lint
|
| 79 |
+
|
| 80 |
+
check:
|
| 81 |
+
name: Check
|
| 82 |
+
if: github.repository == 'vbenjs/vue-vben-admin'
|
| 83 |
+
runs-on: ${{ matrix.os }}
|
| 84 |
+
timeout-minutes: 20
|
| 85 |
+
strategy:
|
| 86 |
+
matrix:
|
| 87 |
+
os:
|
| 88 |
+
- ubuntu-latest
|
| 89 |
+
# - macos-latest
|
| 90 |
+
- windows-latest
|
| 91 |
+
steps:
|
| 92 |
+
- name: Checkout code
|
| 93 |
+
uses: actions/checkout@v4
|
| 94 |
+
with:
|
| 95 |
+
fetch-depth: 0
|
| 96 |
+
|
| 97 |
+
- name: Setup Node
|
| 98 |
+
uses: ./.github/actions/setup-node
|
| 99 |
+
|
| 100 |
+
- name: Typecheck
|
| 101 |
+
run: pnpm check:type
|
| 102 |
+
|
| 103 |
+
# From https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions
|
| 104 |
+
- name: Check workflow files
|
| 105 |
+
if: runner.os == 'Linux'
|
| 106 |
+
run: |
|
| 107 |
+
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
|
| 108 |
+
./actionlint -color -shellcheck=""
|
| 109 |
+
|
| 110 |
+
ci-ok:
|
| 111 |
+
name: CI OK
|
| 112 |
+
if: github.repository == 'vbenjs/vue-vben-admin'
|
| 113 |
+
runs-on: ubuntu-latest
|
| 114 |
+
needs: [test, check, lint]
|
| 115 |
+
env:
|
| 116 |
+
FAILURE: ${{ contains(join(needs.*.result, ','), 'failure') }}
|
| 117 |
+
steps:
|
| 118 |
+
- name: Check for failure
|
| 119 |
+
run: |
|
| 120 |
+
echo $FAILURE
|
| 121 |
+
if [ "$FAILURE" = "false" ]; then
|
| 122 |
+
exit 0
|
| 123 |
+
else
|
| 124 |
+
exit 1
|
| 125 |
+
fi
|
.github/workflows/codeql.yml
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# For most projects, this workflow file will not need changing; you simply need
|
| 2 |
+
# to commit it to your repository.
|
| 3 |
+
#
|
| 4 |
+
# You may wish to alter this file to override the set of languages analyzed,
|
| 5 |
+
# or to provide custom queries or build logic.
|
| 6 |
+
#
|
| 7 |
+
# ******** NOTE ********
|
| 8 |
+
# We have attempted to detect the languages in your repository. Please check
|
| 9 |
+
# the `language` matrix defined below to confirm you have the correct set of
|
| 10 |
+
# supported CodeQL languages.
|
| 11 |
+
#
|
| 12 |
+
name: 'CodeQL'
|
| 13 |
+
|
| 14 |
+
on:
|
| 15 |
+
push:
|
| 16 |
+
branches: ['main']
|
| 17 |
+
pull_request:
|
| 18 |
+
branches: ['main']
|
| 19 |
+
schedule:
|
| 20 |
+
- cron: '35 0 * * 0'
|
| 21 |
+
|
| 22 |
+
jobs:
|
| 23 |
+
analyze:
|
| 24 |
+
name: Analyze (${{ matrix.language }})
|
| 25 |
+
if: github.repository == 'vbenjs/vue-vben-admin'
|
| 26 |
+
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
| 27 |
+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
| 28 |
+
# - https://gh.io/supported-runners-and-hardware-resources
|
| 29 |
+
# - https://gh.io/using-larger-runners (GitHub.com only)
|
| 30 |
+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
| 31 |
+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
| 32 |
+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
|
| 33 |
+
permissions:
|
| 34 |
+
# required for all workflows
|
| 35 |
+
security-events: write
|
| 36 |
+
|
| 37 |
+
# required to fetch internal or private CodeQL packs
|
| 38 |
+
packages: read
|
| 39 |
+
|
| 40 |
+
# only required for workflows in private repositories
|
| 41 |
+
actions: read
|
| 42 |
+
contents: read
|
| 43 |
+
|
| 44 |
+
strategy:
|
| 45 |
+
fail-fast: false
|
| 46 |
+
matrix:
|
| 47 |
+
include:
|
| 48 |
+
- language: javascript-typescript
|
| 49 |
+
build-mode: none
|
| 50 |
+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
|
| 51 |
+
# Use `c-cpp` to analyze code written in C, C++ or both
|
| 52 |
+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
| 53 |
+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
| 54 |
+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
| 55 |
+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
| 56 |
+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
| 57 |
+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
| 58 |
+
steps:
|
| 59 |
+
- name: Checkout repository
|
| 60 |
+
uses: actions/checkout@v4
|
| 61 |
+
|
| 62 |
+
# Initializes the CodeQL tools for scanning.
|
| 63 |
+
- name: Initialize CodeQL
|
| 64 |
+
uses: github/codeql-action/init@v3
|
| 65 |
+
with:
|
| 66 |
+
languages: ${{ matrix.language }}
|
| 67 |
+
build-mode: ${{ matrix.build-mode }}
|
| 68 |
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
| 69 |
+
# By default, queries listed here will override any specified in a config file.
|
| 70 |
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
| 71 |
+
|
| 72 |
+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
| 73 |
+
# queries: security-extended,security-and-quality
|
| 74 |
+
|
| 75 |
+
# If the analyze step fails for one of the languages you are analyzing with
|
| 76 |
+
# "We were unable to automatically build your code", modify the matrix above
|
| 77 |
+
# to set the build mode to "manual" for that language. Then modify this step
|
| 78 |
+
# to build your code.
|
| 79 |
+
# ℹ️ Command-line programs to run using the OS shell.
|
| 80 |
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
| 81 |
+
- if: matrix.build-mode == 'manual'
|
| 82 |
+
shell: bash
|
| 83 |
+
run: |
|
| 84 |
+
echo 'If you are using a "manual" build mode for one or more of the' \
|
| 85 |
+
'languages you are analyzing, replace this with the commands to build' \
|
| 86 |
+
'your code, for example:'
|
| 87 |
+
echo ' make bootstrap'
|
| 88 |
+
echo ' make release'
|
| 89 |
+
exit 1
|
| 90 |
+
|
| 91 |
+
- name: Perform CodeQL Analysis
|
| 92 |
+
uses: github/codeql-action/analyze@v3
|
| 93 |
+
with:
|
| 94 |
+
category: '/language:${{matrix.language}}'
|
.github/workflows/deploy.yml
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Deploy Website on push
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- main
|
| 7 |
+
|
| 8 |
+
jobs:
|
| 9 |
+
deploy-playground-ftp:
|
| 10 |
+
name: Deploy Push Playground Ftp
|
| 11 |
+
if: github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, '[skip ci]') && github.repository == 'vbenjs/vue-vben-admin'
|
| 12 |
+
runs-on: ubuntu-latest
|
| 13 |
+
steps:
|
| 14 |
+
- name: Checkout code
|
| 15 |
+
uses: actions/checkout@v4
|
| 16 |
+
with:
|
| 17 |
+
fetch-depth: 0
|
| 18 |
+
|
| 19 |
+
- name: Sed Config Base
|
| 20 |
+
shell: bash
|
| 21 |
+
run: |
|
| 22 |
+
sed -i "s#VITE_COMPRESS\s*=.*#VITE_COMPRESS = gzip#g" ./playground/.env.production
|
| 23 |
+
sed -i "s#VITE_PWA\s*=.*#VITE_PWA = true#g" ./playground/.env.production
|
| 24 |
+
cat ./playground/.env.production
|
| 25 |
+
|
| 26 |
+
- name: Setup Node
|
| 27 |
+
uses: ./.github/actions/setup-node
|
| 28 |
+
|
| 29 |
+
- name: Build
|
| 30 |
+
run: pnpm build:play
|
| 31 |
+
|
| 32 |
+
- name: Sync Playground files
|
| 33 |
+
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
| 34 |
+
with:
|
| 35 |
+
server: ${{ secrets.PRO_FTP_HOST }}
|
| 36 |
+
username: ${{ secrets.WEB_PLAYGROUND_FTP_ACCOUNT }}
|
| 37 |
+
password: ${{ secrets.WEB_PLAYGROUND_FTP_PWSSWORD }}
|
| 38 |
+
local-dir: ./playground/dist/
|
| 39 |
+
|
| 40 |
+
deploy-docs-ftp:
|
| 41 |
+
name: Deploy Push Docs Ftp
|
| 42 |
+
if: github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, '[skip ci]') && github.repository == 'vbenjs/vue-vben-admin'
|
| 43 |
+
runs-on: ubuntu-latest
|
| 44 |
+
steps:
|
| 45 |
+
- name: Checkout code
|
| 46 |
+
uses: actions/checkout@v4
|
| 47 |
+
with:
|
| 48 |
+
fetch-depth: 0
|
| 49 |
+
|
| 50 |
+
- name: Setup Node
|
| 51 |
+
uses: ./.github/actions/setup-node
|
| 52 |
+
|
| 53 |
+
- name: Build
|
| 54 |
+
run: pnpm build:docs
|
| 55 |
+
|
| 56 |
+
- name: Sync Docs files
|
| 57 |
+
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
| 58 |
+
with:
|
| 59 |
+
server: ${{ secrets.PRO_FTP_HOST }}
|
| 60 |
+
username: ${{ secrets.WEBSITE_FTP_ACCOUNT }}
|
| 61 |
+
password: ${{ secrets.WEBSITE_FTP_PASSWORD }}
|
| 62 |
+
local-dir: ./docs/.vitepress/dist/
|
| 63 |
+
|
| 64 |
+
deploy-antd-ftp:
|
| 65 |
+
name: Deploy Push Antd Ftp
|
| 66 |
+
if: github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, '[skip ci]') && github.repository == 'vbenjs/vue-vben-admin'
|
| 67 |
+
runs-on: ubuntu-latest
|
| 68 |
+
steps:
|
| 69 |
+
- name: Checkout code
|
| 70 |
+
uses: actions/checkout@v4
|
| 71 |
+
with:
|
| 72 |
+
fetch-depth: 0
|
| 73 |
+
|
| 74 |
+
- name: Sed Config Base
|
| 75 |
+
shell: bash
|
| 76 |
+
run: |
|
| 77 |
+
sed -i "s#VITE_COMPRESS\s*=.*#VITE_COMPRESS = gzip#g" ./apps/web-antd/.env.production
|
| 78 |
+
sed -i "s#VITE_PWA\s*=.*#VITE_PWA = true#g" ./apps/web-antd/.env.production
|
| 79 |
+
cat ./apps/web-antd/.env.production
|
| 80 |
+
|
| 81 |
+
- name: Setup Node
|
| 82 |
+
uses: ./.github/actions/setup-node
|
| 83 |
+
|
| 84 |
+
- name: Build
|
| 85 |
+
run: pnpm run build:antd
|
| 86 |
+
|
| 87 |
+
- name: Sync files
|
| 88 |
+
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
| 89 |
+
with:
|
| 90 |
+
server: ${{ secrets.PRO_FTP_HOST }}
|
| 91 |
+
username: ${{ secrets.WEB_ANTD_FTP_ACCOUNT }}
|
| 92 |
+
password: ${{ secrets.WEB_ANTD_FTP_PASSWORD }}
|
| 93 |
+
local-dir: ./apps/web-antd/dist/
|
| 94 |
+
|
| 95 |
+
deploy-ele-ftp:
|
| 96 |
+
name: Deploy Push Element Ftp
|
| 97 |
+
if: github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, '[skip ci]') && github.repository == 'vbenjs/vue-vben-admin'
|
| 98 |
+
runs-on: ubuntu-latest
|
| 99 |
+
steps:
|
| 100 |
+
- name: Checkout code
|
| 101 |
+
uses: actions/checkout@v4
|
| 102 |
+
with:
|
| 103 |
+
fetch-depth: 0
|
| 104 |
+
|
| 105 |
+
- name: Sed Config Base
|
| 106 |
+
shell: bash
|
| 107 |
+
run: |
|
| 108 |
+
sed -i "s#VITE_COMPRESS\s*=.*#VITE_COMPRESS = gzip#g" ./apps/web-ele/.env.production
|
| 109 |
+
sed -i "s#VITE_PWA\s*=.*#VITE_PWA = true#g" ./apps/web-ele/.env.production
|
| 110 |
+
cat ./apps/web-ele/.env.production
|
| 111 |
+
|
| 112 |
+
- name: Setup Node
|
| 113 |
+
uses: ./.github/actions/setup-node
|
| 114 |
+
|
| 115 |
+
- name: Build
|
| 116 |
+
run: pnpm run build:ele
|
| 117 |
+
|
| 118 |
+
- name: Sync files
|
| 119 |
+
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
| 120 |
+
with:
|
| 121 |
+
server: ${{ secrets.PRO_FTP_HOST }}
|
| 122 |
+
username: ${{ secrets.WEB_ELE_FTP_ACCOUNT }}
|
| 123 |
+
password: ${{ secrets.WEB_ELE_FTP_PASSWORD }}
|
| 124 |
+
local-dir: ./apps/web-ele/dist/
|
| 125 |
+
|
| 126 |
+
deploy-naive-ftp:
|
| 127 |
+
name: Deploy Push Naive Ftp
|
| 128 |
+
if: github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, '[skip ci]') && github.repository == 'vbenjs/vue-vben-admin'
|
| 129 |
+
runs-on: ubuntu-latest
|
| 130 |
+
steps:
|
| 131 |
+
- name: Checkout code
|
| 132 |
+
uses: actions/checkout@v4
|
| 133 |
+
with:
|
| 134 |
+
fetch-depth: 0
|
| 135 |
+
|
| 136 |
+
- name: Sed Config Base
|
| 137 |
+
shell: bash
|
| 138 |
+
run: |
|
| 139 |
+
sed -i "s#VITE_COMPRESS\s*=.*#VITE_COMPRESS = gzip#g" ./apps/web-naive/.env.production
|
| 140 |
+
sed -i "s#VITE_PWA\s*=.*#VITE_PWA = true#g" ./apps/web-naive/.env.production
|
| 141 |
+
cat ./apps/web-naive/.env.production
|
| 142 |
+
|
| 143 |
+
- name: Setup Node
|
| 144 |
+
uses: ./.github/actions/setup-node
|
| 145 |
+
|
| 146 |
+
- name: Build
|
| 147 |
+
run: pnpm run build:naive
|
| 148 |
+
|
| 149 |
+
- name: Sync files
|
| 150 |
+
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
| 151 |
+
with:
|
| 152 |
+
server: ${{ secrets.PRO_FTP_HOST }}
|
| 153 |
+
username: ${{ secrets.WEB_NAIVE_FTP_ACCOUNT }}
|
| 154 |
+
password: ${{ secrets.WEB_NAIVE_FTP_PASSWORD }}
|
| 155 |
+
local-dir: ./apps/web-naive/dist/
|
.github/workflows/draft.yml
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Release Drafter
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- main
|
| 7 |
+
|
| 8 |
+
permissions:
|
| 9 |
+
contents: read
|
| 10 |
+
pull-requests: write
|
| 11 |
+
|
| 12 |
+
jobs:
|
| 13 |
+
update_release_draft:
|
| 14 |
+
permissions:
|
| 15 |
+
# write permission is required to create a github release
|
| 16 |
+
contents: write
|
| 17 |
+
# write permission is required for autolabeler
|
| 18 |
+
# otherwise, read permission is required at least
|
| 19 |
+
pull-requests: write
|
| 20 |
+
if: github.repository == 'vbenjs/vue-vben-admin'
|
| 21 |
+
runs-on: ubuntu-latest
|
| 22 |
+
steps:
|
| 23 |
+
- uses: release-drafter/release-drafter@v6
|
| 24 |
+
env:
|
| 25 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
.github/workflows/issue-close-require.yml
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 每天零点运行一次,它会检查所有带有 "need reproduction" 标签的 Issues。如果这些 Issues 在过去的 3 天内没有任何活动,它们将会被自动关闭。这有助于保持 Issue 列表的整洁,并且提醒用户在必要时提供更多的信息。
|
| 2 |
+
name: Issue Close Require
|
| 3 |
+
|
| 4 |
+
# 触发条件:每天零点
|
| 5 |
+
on:
|
| 6 |
+
workflow_dispatch:
|
| 7 |
+
schedule:
|
| 8 |
+
- cron: '0 0 * * *'
|
| 9 |
+
|
| 10 |
+
permissions:
|
| 11 |
+
pull-requests: write
|
| 12 |
+
contents: write
|
| 13 |
+
issues: write
|
| 14 |
+
|
| 15 |
+
jobs:
|
| 16 |
+
close-issues:
|
| 17 |
+
if: github.repository == 'vbenjs/vue-vben-admin'
|
| 18 |
+
runs-on: ubuntu-latest
|
| 19 |
+
steps:
|
| 20 |
+
# 关闭未活动的 Issues
|
| 21 |
+
- name: Close Inactive Issues
|
| 22 |
+
uses: actions/stale@v9
|
| 23 |
+
with:
|
| 24 |
+
days-before-stale: -1 # Issues and PR will never be flagged stale automatically.
|
| 25 |
+
stale-issue-label: needs-reproduction # Label that flags an issue as stale.
|
| 26 |
+
only-labels: needs-reproduction # Only process these issues
|
| 27 |
+
days-before-issue-close: 3
|
| 28 |
+
ignore-updates: true
|
| 29 |
+
remove-stale-when-updated: false
|
| 30 |
+
close-issue-message: This issue was closed because it was open for 3 days without a valid reproduction.
|
| 31 |
+
close-issue-label: closed-by-action
|
.github/workflows/issue-labeled.yml
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Label Based Actions
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
issues:
|
| 5 |
+
types: [labeled]
|
| 6 |
+
# pull_request:
|
| 7 |
+
# types: [labeled]
|
| 8 |
+
|
| 9 |
+
permissions:
|
| 10 |
+
issues: write
|
| 11 |
+
pull-requests: write
|
| 12 |
+
contents: write
|
| 13 |
+
|
| 14 |
+
jobs:
|
| 15 |
+
reply-labeled:
|
| 16 |
+
if: github.repository == 'vbenjs/vue-vben-admin'
|
| 17 |
+
runs-on: ubuntu-latest
|
| 18 |
+
steps:
|
| 19 |
+
- name: remove enhancement pending
|
| 20 |
+
if: github.event.label.name == 'enhancement'
|
| 21 |
+
uses: actions-cool/issues-helper@v3
|
| 22 |
+
with:
|
| 23 |
+
actions: 'remove-labels'
|
| 24 |
+
token: ${{ secrets.GITHUB_TOKEN }}
|
| 25 |
+
issue-number: ${{ github.event.issue.number }}
|
| 26 |
+
labels: 'enhancement: pending triage'
|
| 27 |
+
|
| 28 |
+
- name: remove bug pending
|
| 29 |
+
if: github.event.label.name == 'bug'
|
| 30 |
+
uses: actions-cool/issues-helper@v3
|
| 31 |
+
with:
|
| 32 |
+
actions: 'remove-labels'
|
| 33 |
+
token: ${{ secrets.GITHUB_TOKEN }}
|
| 34 |
+
issue-number: ${{ github.event.issue.number }}
|
| 35 |
+
labels: 'bug: pending triage'
|
| 36 |
+
|
| 37 |
+
- name: needs reproduction
|
| 38 |
+
if: github.event.label.name == 'needs reproduction'
|
| 39 |
+
uses: actions-cool/issues-helper@v3
|
| 40 |
+
with:
|
| 41 |
+
actions: 'create-comment, remove-labels'
|
| 42 |
+
token: ${{ secrets.GITHUB_TOKEN }}
|
| 43 |
+
issue-number: ${{ github.event.issue.number }}
|
| 44 |
+
body: |
|
| 45 |
+
Hello @${{ github.event.issue.user.login }}. Please provide the complete reproduction steps and code. Issues labeled by `needs reproduction` will be closed if no activities in 3 days.
|
| 46 |
+
labels: 'bug: pending triage'
|
.github/workflows/lock.yml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Lock Threads
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
schedule:
|
| 5 |
+
- cron: '0 0 * * *'
|
| 6 |
+
workflow_dispatch:
|
| 7 |
+
|
| 8 |
+
permissions:
|
| 9 |
+
issues: write
|
| 10 |
+
pull-requests: write
|
| 11 |
+
|
| 12 |
+
jobs:
|
| 13 |
+
action:
|
| 14 |
+
if: github.repository == 'vbenjs/vue-vben-admin'
|
| 15 |
+
runs-on: ubuntu-latest
|
| 16 |
+
steps:
|
| 17 |
+
- uses: dessant/lock-threads@v5
|
| 18 |
+
with:
|
| 19 |
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
| 20 |
+
issue-inactive-days: '14'
|
| 21 |
+
issue-lock-reason: ''
|
| 22 |
+
pr-inactive-days: '30'
|
| 23 |
+
pr-lock-reason: ''
|
| 24 |
+
process-only: 'issues, prs'
|
.github/workflows/release-tag.yml
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Create Release Tag
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
tags:
|
| 6 |
+
- 'v*.*.*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
| 7 |
+
|
| 8 |
+
env:
|
| 9 |
+
HUSKY: '0'
|
| 10 |
+
|
| 11 |
+
permissions:
|
| 12 |
+
pull-requests: write
|
| 13 |
+
contents: write
|
| 14 |
+
|
| 15 |
+
jobs:
|
| 16 |
+
build:
|
| 17 |
+
name: Create Release
|
| 18 |
+
if: github.repository == 'vbenjs/vue-vben-admin'
|
| 19 |
+
runs-on: ubuntu-latest
|
| 20 |
+
strategy:
|
| 21 |
+
matrix:
|
| 22 |
+
node-version: [20]
|
| 23 |
+
steps:
|
| 24 |
+
- name: Checkout code
|
| 25 |
+
uses: actions/checkout@v4
|
| 26 |
+
with:
|
| 27 |
+
fetch-depth: 0
|
| 28 |
+
|
| 29 |
+
# - name: Checkout code
|
| 30 |
+
# uses: actions/checkout@v4
|
| 31 |
+
# with:
|
| 32 |
+
# fetch-depth: 0
|
| 33 |
+
|
| 34 |
+
# - name: Install pnpm
|
| 35 |
+
# uses: pnpm/action-setup@v4
|
| 36 |
+
|
| 37 |
+
# - name: Use Node.js ${{ matrix.node-version }}
|
| 38 |
+
# uses: actions/setup-node@v4
|
| 39 |
+
# with:
|
| 40 |
+
# node-version: ${{ matrix.node-version }}
|
| 41 |
+
# cache: "pnpm"
|
| 42 |
+
|
| 43 |
+
# - name: Install dependencies
|
| 44 |
+
# run: pnpm install --frozen-lockfile
|
| 45 |
+
|
| 46 |
+
# - name: Test and Build
|
| 47 |
+
# run: |
|
| 48 |
+
# pnpm run test
|
| 49 |
+
# pnpm run build
|
| 50 |
+
|
| 51 |
+
- name: version
|
| 52 |
+
id: version
|
| 53 |
+
run: |
|
| 54 |
+
tag=${GITHUB_REF/refs\/tags\//}
|
| 55 |
+
version=${tag#v}
|
| 56 |
+
major=${version%%.*}
|
| 57 |
+
echo "tag=${tag}" >> $GITHUB_OUTPUT
|
| 58 |
+
echo "version=${version}" >> $GITHUB_OUTPUT
|
| 59 |
+
echo "major=${major}" >> $GITHUB_OUTPUT
|
| 60 |
+
|
| 61 |
+
- uses: release-drafter/release-drafter@v6
|
| 62 |
+
with:
|
| 63 |
+
version: ${{ steps.version.outputs.version }}
|
| 64 |
+
publish: true
|
| 65 |
+
env:
|
| 66 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 67 |
+
|
| 68 |
+
# - name: force update major tag
|
| 69 |
+
# run: |
|
| 70 |
+
# git tag v${{ steps.version.outputs.major }} ${{ steps.version.outputs.tag }} -f
|
| 71 |
+
# git push origin refs/tags/v${{ steps.version.outputs.major }} -f
|
| 72 |
+
|
| 73 |
+
# - name: Create Release for Tag
|
| 74 |
+
# id: release_tag
|
| 75 |
+
# uses: ncipollo/release-action@v1
|
| 76 |
+
# with:
|
| 77 |
+
# token: ${{ secrets.GITHUB_TOKEN }}
|
| 78 |
+
# generateReleaseNotes: "true"
|
| 79 |
+
# body: |
|
| 80 |
+
# > Please refer to [CHANGELOG.md](https://github.com/vbenjs/vue-vben-admin/blob/main/CHANGELOG.md) for details.
|
.github/workflows/semantic-pull-request.yml
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Semantic Pull Request
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
pull_request_target:
|
| 5 |
+
types:
|
| 6 |
+
- opened
|
| 7 |
+
- edited
|
| 8 |
+
- synchronize
|
| 9 |
+
|
| 10 |
+
jobs:
|
| 11 |
+
main:
|
| 12 |
+
name: Semantic Pull Request
|
| 13 |
+
if: github.repository == 'vbenjs/vue-vben-admin'
|
| 14 |
+
runs-on: ubuntu-latest
|
| 15 |
+
steps:
|
| 16 |
+
- name: Validate PR title
|
| 17 |
+
uses: amannn/action-semantic-pull-request@v5
|
| 18 |
+
with:
|
| 19 |
+
wip: true
|
| 20 |
+
subjectPattern: ^(?![A-Z]).+$
|
| 21 |
+
subjectPatternError: |
|
| 22 |
+
The subject "{subject}" found in the pull request title "{title}"
|
| 23 |
+
didn't match the configured pattern. Please ensure that the subject
|
| 24 |
+
doesn't start with an uppercase character.
|
| 25 |
+
requireScope: false
|
| 26 |
+
types: |
|
| 27 |
+
fix
|
| 28 |
+
feat
|
| 29 |
+
docs
|
| 30 |
+
style
|
| 31 |
+
refactor
|
| 32 |
+
perf
|
| 33 |
+
test
|
| 34 |
+
build
|
| 35 |
+
ci
|
| 36 |
+
chore
|
| 37 |
+
revert
|
| 38 |
+
types
|
| 39 |
+
release
|
| 40 |
+
env:
|
| 41 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
.github/workflows/stale.yml
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: 'Close stale issues'
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
schedule:
|
| 5 |
+
- cron: '0 1 * * *'
|
| 6 |
+
|
| 7 |
+
jobs:
|
| 8 |
+
stale:
|
| 9 |
+
if: github.repository == 'vbenjs/vue-vben-admin'
|
| 10 |
+
runs-on: ubuntu-latest
|
| 11 |
+
steps:
|
| 12 |
+
- uses: actions/stale@v9
|
| 13 |
+
with:
|
| 14 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
| 15 |
+
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days'
|
| 16 |
+
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days'
|
| 17 |
+
exempt-issue-labels: 'bug,enhancement'
|
| 18 |
+
days-before-stale: 60
|
| 19 |
+
days-before-close: 7
|
.gitignore
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
node_modules
|
| 2 |
+
.DS_Store
|
| 3 |
+
dist
|
| 4 |
+
dist-ssr
|
| 5 |
+
dist.zip
|
| 6 |
+
dist.tar
|
| 7 |
+
dist.war
|
| 8 |
+
.nitro
|
| 9 |
+
.output
|
| 10 |
+
*-dist.zip
|
| 11 |
+
*-dist.tar
|
| 12 |
+
*-dist.war
|
| 13 |
+
coverage
|
| 14 |
+
*.local
|
| 15 |
+
**/.vitepress/cache
|
| 16 |
+
.cache
|
| 17 |
+
.turbo
|
| 18 |
+
.temp
|
| 19 |
+
dev-dist
|
| 20 |
+
.stylelintcache
|
| 21 |
+
yarn.lock
|
| 22 |
+
package-lock.json
|
| 23 |
+
.VSCodeCounter
|
| 24 |
+
**/backend-mock/data
|
| 25 |
+
|
| 26 |
+
# local env files
|
| 27 |
+
.env.local
|
| 28 |
+
.env.*.local
|
| 29 |
+
.eslintcache
|
| 30 |
+
|
| 31 |
+
logs
|
| 32 |
+
*.log
|
| 33 |
+
npm-debug.log*
|
| 34 |
+
yarn-debug.log*
|
| 35 |
+
yarn-error.log*
|
| 36 |
+
pnpm-debug.log*
|
| 37 |
+
lerna-debug.log*
|
| 38 |
+
vite.config.mts.*
|
| 39 |
+
vite.config.mjs.*
|
| 40 |
+
vite.config.js.*
|
| 41 |
+
vite.config.ts.*
|
| 42 |
+
|
| 43 |
+
# Editor directories and files
|
| 44 |
+
.idea
|
| 45 |
+
# .vscode
|
| 46 |
+
*.suo
|
| 47 |
+
*.ntvs*
|
| 48 |
+
*.njsproj
|
| 49 |
+
*.sln
|
| 50 |
+
*.sw?
|
| 51 |
+
.history
|
.gitpod.yml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ports:
|
| 2 |
+
- port: 5555
|
| 3 |
+
onOpen: open-preview
|
| 4 |
+
tasks:
|
| 5 |
+
- init: corepack enable && pnpm install
|
| 6 |
+
command: pnpm run dev:play
|
.husky/commit-msg
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
echo Start running commit-msg hook...
|
| 2 |
+
|
| 3 |
+
# Check whether the git commit information is standardized
|
| 4 |
+
pnpm exec commitlint --edit "$1"
|
| 5 |
+
|
| 6 |
+
echo Run commit-msg hook done.
|
.husky/post-merge
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 每次 git pull 之后, 安装依赖
|
| 2 |
+
|
| 3 |
+
pnpm install
|
.husky/pre-commit
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# update `.vscode/vben-admin.code-workspace` file
|
| 2 |
+
pnpm vsh code-workspace --auto-commit
|
| 3 |
+
|
| 4 |
+
# Format and submit code according to lintstagedrc.js configuration
|
| 5 |
+
pnpm exec lint-staged
|
| 6 |
+
|
| 7 |
+
echo Run pre-commit hook done.
|
.lintstagedrc.mjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export default {
|
| 2 |
+
'*.{js,jsx,ts,tsx}': [
|
| 3 |
+
'prettier --cache --ignore-unknown --write',
|
| 4 |
+
'eslint --cache --fix',
|
| 5 |
+
],
|
| 6 |
+
'*.{scss,less,styl,html,vue,css}': [
|
| 7 |
+
'prettier --cache --ignore-unknown --write',
|
| 8 |
+
'stylelint --fix --allow-empty-input',
|
| 9 |
+
],
|
| 10 |
+
'*.md': ['prettier --cache --ignore-unknown --write'],
|
| 11 |
+
'*.vue': [
|
| 12 |
+
'prettier --write',
|
| 13 |
+
'eslint --cache --fix',
|
| 14 |
+
'stylelint --fix --allow-empty-input',
|
| 15 |
+
],
|
| 16 |
+
'{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': [
|
| 17 |
+
'prettier --cache --write--parser json',
|
| 18 |
+
],
|
| 19 |
+
'package.json': ['prettier --cache --write'],
|
| 20 |
+
};
|
.node-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
20.14.0
|
.npmrc
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
registry = "https://registry.npmmirror.com"
|
| 2 |
+
public-hoist-pattern[]=husky
|
| 3 |
+
public-hoist-pattern[]=eslint
|
| 4 |
+
public-hoist-pattern[]=prettier
|
| 5 |
+
public-hoist-pattern[]=prettier-plugin-tailwindcss
|
| 6 |
+
public-hoist-pattern[]=stylelint
|
| 7 |
+
public-hoist-pattern[]=*postcss*
|
| 8 |
+
public-hoist-pattern[]=@commitlint/*
|
| 9 |
+
public-hoist-pattern[]=czg
|
| 10 |
+
|
| 11 |
+
strict-peer-dependencies=false
|
| 12 |
+
auto-install-peers=true
|
| 13 |
+
dedupe-peer-dependents=true
|
.prettierignore
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dist
|
| 2 |
+
dev-dist
|
| 3 |
+
.local
|
| 4 |
+
.output.js
|
| 5 |
+
node_modules
|
| 6 |
+
.nvmrc
|
| 7 |
+
coverage
|
| 8 |
+
CODEOWNERS
|
| 9 |
+
.nitro
|
| 10 |
+
.output
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
**/*.svg
|
| 14 |
+
**/*.sh
|
| 15 |
+
|
| 16 |
+
public
|
| 17 |
+
.npmrc
|
| 18 |
+
*-lock.yaml
|
.prettierrc.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
export { default } from '@vben/prettier-config';
|
.stylelintignore
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dist
|
| 2 |
+
public
|
| 3 |
+
__tests__
|
| 4 |
+
coverage
|
.vscode/extensions.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"recommendations": [
|
| 3 |
+
// Vue 3 的语言支持
|
| 4 |
+
"Vue.volar",
|
| 5 |
+
// 将 ESLint JavaScript 集成到 VS Code 中。
|
| 6 |
+
"dbaeumer.vscode-eslint",
|
| 7 |
+
// Visual Studio Code 的官方 Stylelint 扩展
|
| 8 |
+
"stylelint.vscode-stylelint",
|
| 9 |
+
// 使用 Prettier 的代码格式化程序
|
| 10 |
+
"esbenp.prettier-vscode",
|
| 11 |
+
// 支持 dotenv 文件语法
|
| 12 |
+
"mikestead.dotenv",
|
| 13 |
+
// 源代码的拼写检查器
|
| 14 |
+
"streetsidesoftware.code-spell-checker",
|
| 15 |
+
// Tailwind CSS 的官方 VS Code 插件
|
| 16 |
+
"bradlc.vscode-tailwindcss",
|
| 17 |
+
// iconify 图标插件
|
| 18 |
+
"antfu.iconify",
|
| 19 |
+
// i18n 插件
|
| 20 |
+
"Lokalise.i18n-ally",
|
| 21 |
+
// CSS 变量提示
|
| 22 |
+
"vunguyentuan.vscode-css-variables",
|
| 23 |
+
// 在 package.json 中显示 PNPM catalog 的版本
|
| 24 |
+
"antfu.pnpm-catalog-lens"
|
| 25 |
+
],
|
| 26 |
+
"unwantedRecommendations": [
|
| 27 |
+
// 和 volar 冲突
|
| 28 |
+
"octref.vetur"
|
| 29 |
+
]
|
| 30 |
+
}
|
.vscode/global.code-snippets
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"import": {
|
| 3 |
+
"scope": "javascript,typescript",
|
| 4 |
+
"prefix": "im",
|
| 5 |
+
"body": ["import { $2 } from '$1';"],
|
| 6 |
+
"description": "Import a module",
|
| 7 |
+
},
|
| 8 |
+
"export-all": {
|
| 9 |
+
"scope": "javascript,typescript",
|
| 10 |
+
"prefix": "ex",
|
| 11 |
+
"body": ["export * from '$1';"],
|
| 12 |
+
"description": "Export a module",
|
| 13 |
+
},
|
| 14 |
+
"vue-script-setup": {
|
| 15 |
+
"scope": "vue",
|
| 16 |
+
"prefix": "<sc",
|
| 17 |
+
"body": [
|
| 18 |
+
"<script setup lang=\"ts\">",
|
| 19 |
+
"const props = defineProps<{",
|
| 20 |
+
" modelValue?: boolean,",
|
| 21 |
+
"}>()",
|
| 22 |
+
"$1",
|
| 23 |
+
"</script>",
|
| 24 |
+
"",
|
| 25 |
+
"<template>",
|
| 26 |
+
" <div>",
|
| 27 |
+
" <slot/>",
|
| 28 |
+
" </div>",
|
| 29 |
+
"</template>",
|
| 30 |
+
],
|
| 31 |
+
},
|
| 32 |
+
"vue-computed": {
|
| 33 |
+
"scope": "javascript,typescript,vue",
|
| 34 |
+
"prefix": "com",
|
| 35 |
+
"body": ["computed(() => { $1 })"],
|
| 36 |
+
},
|
| 37 |
+
}
|
.vscode/launch.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"$schema": "https://json.schemastore.org/launchsettings.json",
|
| 3 |
+
"version": "0.2.0",
|
| 4 |
+
"configurations": [
|
| 5 |
+
{
|
| 6 |
+
"type": "chrome",
|
| 7 |
+
"name": "vben admin playground dev",
|
| 8 |
+
"request": "launch",
|
| 9 |
+
"url": "http://localhost:5555",
|
| 10 |
+
"env": { "NODE_ENV": "development" },
|
| 11 |
+
"sourceMaps": true,
|
| 12 |
+
"webRoot": "${workspaceFolder}/playground"
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "chrome",
|
| 16 |
+
"name": "vben admin antd dev",
|
| 17 |
+
"request": "launch",
|
| 18 |
+
"url": "http://localhost:5666",
|
| 19 |
+
"env": { "NODE_ENV": "development" },
|
| 20 |
+
"sourceMaps": true,
|
| 21 |
+
"webRoot": "${workspaceFolder}/apps/web-antd"
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"type": "chrome",
|
| 25 |
+
"name": "vben admin ele dev",
|
| 26 |
+
"request": "launch",
|
| 27 |
+
"url": "http://localhost:5777",
|
| 28 |
+
"env": { "NODE_ENV": "development" },
|
| 29 |
+
"sourceMaps": true,
|
| 30 |
+
"webRoot": "${workspaceFolder}/apps/web-ele"
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"type": "chrome",
|
| 34 |
+
"name": "vben admin naive dev",
|
| 35 |
+
"request": "launch",
|
| 36 |
+
"url": "http://localhost:5888",
|
| 37 |
+
"env": { "NODE_ENV": "development" },
|
| 38 |
+
"sourceMaps": true,
|
| 39 |
+
"webRoot": "${workspaceFolder}/apps/web-naive"
|
| 40 |
+
}
|
| 41 |
+
]
|
| 42 |
+
}
|
.vscode/settings.json
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tailwindCSS.experimental.configFile": "internal/tailwind-config/src/index.ts",
|
| 3 |
+
// workbench
|
| 4 |
+
"workbench.list.smoothScrolling": true,
|
| 5 |
+
"workbench.startupEditor": "newUntitledFile",
|
| 6 |
+
"workbench.tree.indent": 10,
|
| 7 |
+
"workbench.editor.highlightModifiedTabs": true,
|
| 8 |
+
"workbench.editor.closeOnFileDelete": true,
|
| 9 |
+
"workbench.editor.limit.enabled": true,
|
| 10 |
+
"workbench.editor.limit.perEditorGroup": true,
|
| 11 |
+
"workbench.editor.limit.value": 5,
|
| 12 |
+
|
| 13 |
+
// editor
|
| 14 |
+
"editor.tabSize": 2,
|
| 15 |
+
"editor.detectIndentation": false,
|
| 16 |
+
"editor.cursorBlinking": "expand",
|
| 17 |
+
"editor.largeFileOptimizations": false,
|
| 18 |
+
"editor.accessibilitySupport": "off",
|
| 19 |
+
"editor.cursorSmoothCaretAnimation": "on",
|
| 20 |
+
"editor.guides.bracketPairs": "active",
|
| 21 |
+
"editor.inlineSuggest.enabled": true,
|
| 22 |
+
"editor.suggestSelection": "recentlyUsedByPrefix",
|
| 23 |
+
"editor.acceptSuggestionOnEnter": "smart",
|
| 24 |
+
"editor.suggest.snippetsPreventQuickSuggestions": false,
|
| 25 |
+
"editor.stickyScroll.enabled": true,
|
| 26 |
+
"editor.hover.sticky": true,
|
| 27 |
+
"editor.suggest.insertMode": "replace",
|
| 28 |
+
"editor.bracketPairColorization.enabled": true,
|
| 29 |
+
"editor.autoClosingBrackets": "beforeWhitespace",
|
| 30 |
+
"editor.autoClosingDelete": "always",
|
| 31 |
+
"editor.autoClosingOvertype": "always",
|
| 32 |
+
"editor.autoClosingQuotes": "beforeWhitespace",
|
| 33 |
+
"editor.wordSeparators": "`~!@#%^&*()=+[{]}\\|;:'\",.<>/?",
|
| 34 |
+
"editor.codeActionsOnSave": {
|
| 35 |
+
"source.fixAll.eslint": "explicit",
|
| 36 |
+
"source.fixAll.stylelint": "explicit",
|
| 37 |
+
"source.organizeImports": "never"
|
| 38 |
+
},
|
| 39 |
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
| 40 |
+
"[html]": {
|
| 41 |
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
| 42 |
+
},
|
| 43 |
+
"[css]": {
|
| 44 |
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
| 45 |
+
},
|
| 46 |
+
"[scss]": {
|
| 47 |
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
| 48 |
+
},
|
| 49 |
+
"[javascript]": {
|
| 50 |
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
| 51 |
+
},
|
| 52 |
+
"[typescript]": {
|
| 53 |
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
| 54 |
+
},
|
| 55 |
+
"[json]": {
|
| 56 |
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
| 57 |
+
},
|
| 58 |
+
"[markdown]": {
|
| 59 |
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
| 60 |
+
},
|
| 61 |
+
"[jsonc]": {
|
| 62 |
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
| 63 |
+
},
|
| 64 |
+
"[vue]": {
|
| 65 |
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
| 66 |
+
},
|
| 67 |
+
// extensions
|
| 68 |
+
"extensions.ignoreRecommendations": true,
|
| 69 |
+
|
| 70 |
+
// terminal
|
| 71 |
+
"terminal.integrated.cursorBlinking": true,
|
| 72 |
+
"terminal.integrated.persistentSessionReviveProcess": "never",
|
| 73 |
+
"terminal.integrated.tabs.enabled": true,
|
| 74 |
+
"terminal.integrated.scrollback": 10000,
|
| 75 |
+
"terminal.integrated.stickyScroll.enabled": true,
|
| 76 |
+
|
| 77 |
+
// files
|
| 78 |
+
"files.eol": "\n",
|
| 79 |
+
"files.insertFinalNewline": true,
|
| 80 |
+
"files.simpleDialog.enable": true,
|
| 81 |
+
"files.associations": {
|
| 82 |
+
"*.ejs": "html",
|
| 83 |
+
"*.art": "html",
|
| 84 |
+
"**/tsconfig.json": "jsonc",
|
| 85 |
+
"*.json": "jsonc",
|
| 86 |
+
"package.json": "json"
|
| 87 |
+
},
|
| 88 |
+
|
| 89 |
+
"files.exclude": {
|
| 90 |
+
"**/.eslintcache": true,
|
| 91 |
+
"**/bower_components": true,
|
| 92 |
+
"**/.turbo": true,
|
| 93 |
+
"**/.idea": true,
|
| 94 |
+
"**/tmp": true,
|
| 95 |
+
"**/.git": true,
|
| 96 |
+
"**/.svn": true,
|
| 97 |
+
"**/.hg": true,
|
| 98 |
+
"**/CVS": true,
|
| 99 |
+
"**/.stylelintcache": true,
|
| 100 |
+
"**/.DS_Store": true,
|
| 101 |
+
"**/vite.config.mts.*": true,
|
| 102 |
+
"**/tea.yaml": true
|
| 103 |
+
},
|
| 104 |
+
"files.watcherExclude": {
|
| 105 |
+
"**/.git/objects/**": true,
|
| 106 |
+
"**/.git/subtree-cache/**": true,
|
| 107 |
+
"**/.vscode/**": true,
|
| 108 |
+
"**/node_modules/**": true,
|
| 109 |
+
"**/tmp/**": true,
|
| 110 |
+
"**/bower_components/**": true,
|
| 111 |
+
"**/dist/**": true,
|
| 112 |
+
"**/yarn.lock": true
|
| 113 |
+
},
|
| 114 |
+
|
| 115 |
+
// search
|
| 116 |
+
"search.searchEditor.singleClickBehaviour": "peekDefinition",
|
| 117 |
+
"search.followSymlinks": false,
|
| 118 |
+
// 在使用搜索功能时,将这些文件夹/文件排除在外
|
| 119 |
+
"search.exclude": {
|
| 120 |
+
"**/node_modules": true,
|
| 121 |
+
"**/*.log": true,
|
| 122 |
+
"**/*.log*": true,
|
| 123 |
+
"**/bower_components": true,
|
| 124 |
+
"**/dist": true,
|
| 125 |
+
"**/elehukouben": true,
|
| 126 |
+
"**/.git": true,
|
| 127 |
+
"**/.github": true,
|
| 128 |
+
"**/.gitignore": true,
|
| 129 |
+
"**/.svn": true,
|
| 130 |
+
"**/.DS_Store": true,
|
| 131 |
+
"**/.vitepress/cache": true,
|
| 132 |
+
"**/.idea": true,
|
| 133 |
+
"**/.vscode": false,
|
| 134 |
+
"**/.yarn": true,
|
| 135 |
+
"**/tmp": true,
|
| 136 |
+
"*.xml": true,
|
| 137 |
+
"out": true,
|
| 138 |
+
"dist": true,
|
| 139 |
+
"node_modules": true,
|
| 140 |
+
"CHANGELOG.md": true,
|
| 141 |
+
"**/pnpm-lock.yaml": true,
|
| 142 |
+
"**/yarn.lock": true
|
| 143 |
+
},
|
| 144 |
+
|
| 145 |
+
"debug.onTaskErrors": "debugAnyway",
|
| 146 |
+
"diffEditor.ignoreTrimWhitespace": false,
|
| 147 |
+
"npm.packageManager": "pnpm",
|
| 148 |
+
|
| 149 |
+
"css.validate": false,
|
| 150 |
+
"less.validate": false,
|
| 151 |
+
"scss.validate": false,
|
| 152 |
+
|
| 153 |
+
// extension
|
| 154 |
+
"emmet.showSuggestionsAsSnippets": true,
|
| 155 |
+
"emmet.triggerExpansionOnTab": false,
|
| 156 |
+
|
| 157 |
+
"errorLens.enabledDiagnosticLevels": ["warning", "error"],
|
| 158 |
+
"errorLens.excludeBySource": ["cSpell", "Grammarly", "eslint"],
|
| 159 |
+
|
| 160 |
+
"stylelint.enable": true,
|
| 161 |
+
"stylelint.packageManager": "pnpm",
|
| 162 |
+
"stylelint.validate": ["css", "less", "postcss", "scss", "vue"],
|
| 163 |
+
"stylelint.customSyntax": "postcss-html",
|
| 164 |
+
"stylelint.snippet": ["css", "less", "postcss", "scss", "vue"],
|
| 165 |
+
|
| 166 |
+
"typescript.inlayHints.enumMemberValues.enabled": true,
|
| 167 |
+
"typescript.preferences.preferTypeOnlyAutoImports": true,
|
| 168 |
+
"typescript.preferences.includePackageJsonAutoImports": "on",
|
| 169 |
+
|
| 170 |
+
"eslint.validate": [
|
| 171 |
+
"javascript",
|
| 172 |
+
"typescript",
|
| 173 |
+
"javascriptreact",
|
| 174 |
+
"typescriptreact",
|
| 175 |
+
"vue",
|
| 176 |
+
"html",
|
| 177 |
+
"markdown",
|
| 178 |
+
"json",
|
| 179 |
+
"jsonc",
|
| 180 |
+
"json5"
|
| 181 |
+
],
|
| 182 |
+
|
| 183 |
+
"tailwindCSS.experimental.classRegex": [
|
| 184 |
+
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
|
| 185 |
+
],
|
| 186 |
+
|
| 187 |
+
"github.copilot.enable": {
|
| 188 |
+
"*": true,
|
| 189 |
+
"markdown": true,
|
| 190 |
+
"plaintext": false,
|
| 191 |
+
"yaml": false
|
| 192 |
+
},
|
| 193 |
+
|
| 194 |
+
"cssVariables.lookupFiles": ["packages/core/base/design/src/**/*.css"],
|
| 195 |
+
|
| 196 |
+
"i18n-ally.localesPaths": [
|
| 197 |
+
"packages/locales/src/langs",
|
| 198 |
+
"playground/src/locales/langs",
|
| 199 |
+
"apps/*/src/locales/langs"
|
| 200 |
+
],
|
| 201 |
+
"i18n-ally.pathMatcher": "{locale}/{namespace}.{ext}",
|
| 202 |
+
"i18n-ally.enabledParsers": ["json"],
|
| 203 |
+
"i18n-ally.sourceLanguage": "en",
|
| 204 |
+
"i18n-ally.displayLanguage": "zh-CN",
|
| 205 |
+
"i18n-ally.enabledFrameworks": ["vue", "react"],
|
| 206 |
+
"i18n-ally.keystyle": "nested",
|
| 207 |
+
"i18n-ally.sortKeys": true,
|
| 208 |
+
"i18n-ally.namespace": true,
|
| 209 |
+
|
| 210 |
+
// 控制相关文件嵌套展示
|
| 211 |
+
"explorer.fileNesting.enabled": true,
|
| 212 |
+
"explorer.fileNesting.expand": false,
|
| 213 |
+
"explorer.fileNesting.patterns": {
|
| 214 |
+
"*.ts": "$(capture).test.ts, $(capture).test.tsx, $(capture).spec.ts, $(capture).spec.tsx, $(capture).d.ts",
|
| 215 |
+
"*.tsx": "$(capture).test.ts, $(capture).test.tsx, $(capture).spec.ts, $(capture).spec.tsx,$(capture).d.ts",
|
| 216 |
+
"*.env": "$(capture).env.*",
|
| 217 |
+
"README.md": "README*,CHANGELOG*,LICENSE,CNAME",
|
| 218 |
+
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,.gitattributes,.gitignore,.gitpod.yml,.npmrc,.browserslistrc,.node-version,.git*,.tazerc.json",
|
| 219 |
+
"eslint.config.mjs": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.*,.prettierrc.*,stylelint.config.*,.lintstagedrc.mjs,cspell.json",
|
| 220 |
+
"tailwind.config.mjs": "postcss.*"
|
| 221 |
+
},
|
| 222 |
+
"commentTranslate.hover.enabled": false,
|
| 223 |
+
"commentTranslate.multiLineMerge": true,
|
| 224 |
+
"vue.server.hybridMode": true,
|
| 225 |
+
"typescript.tsdk": "node_modules/typescript/lib",
|
| 226 |
+
"oxc.enable": false
|
| 227 |
+
}
|
Dockerfile
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM node:20-slim AS builder
|
| 2 |
+
|
| 3 |
+
ENV PNPM_HOME="/pnpm"
|
| 4 |
+
ENV PATH="$PNPM_HOME:$PATH"
|
| 5 |
+
ENV NODE_OPTIONS=--max-old-space-size=8192
|
| 6 |
+
ENV TZ=Asia/Shanghai
|
| 7 |
+
|
| 8 |
+
RUN corepack enable
|
| 9 |
+
|
| 10 |
+
WORKDIR /app
|
| 11 |
+
|
| 12 |
+
# Copy all source files
|
| 13 |
+
COPY . /app
|
| 14 |
+
|
| 15 |
+
# Install dependencies and build only web-naive
|
| 16 |
+
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
| 17 |
+
RUN pnpm run build --filter=@vben/web-naive
|
| 18 |
+
|
| 19 |
+
RUN echo "Build success"
|
| 20 |
+
|
| 21 |
+
# ── Production image ──────────────────────────────────────────────────────────
|
| 22 |
+
FROM nginx:stable-alpine AS production
|
| 23 |
+
|
| 24 |
+
# Support .mjs files
|
| 25 |
+
RUN echo 'types { application/javascript js mjs; }' > /etc/nginx/conf.d/mjs.conf
|
| 26 |
+
|
| 27 |
+
# Copy built files
|
| 28 |
+
COPY --from=builder /app/apps/web-naive/dist /usr/share/nginx/html
|
| 29 |
+
|
| 30 |
+
# Copy nginx config
|
| 31 |
+
COPY scripts/deploy/nginx.conf /etc/nginx/nginx.conf
|
| 32 |
+
|
| 33 |
+
# HuggingFace Spaces exposes port 7860
|
| 34 |
+
EXPOSE 7860
|
| 35 |
+
|
| 36 |
+
CMD ["nginx", "-g", "daemon off;"]
|
LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2024-present, Vben
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
| 6 |
+
|
| 7 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 8 |
+
|
| 9 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
README.ja-JP.md
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<div align="center"> <a href="https://github.com/anncwb/vue-vben-admin"> <img alt="VbenAdmin Logo" width="215" src="https://unpkg.com/@vbenjs/static-source@0.1.7/source/logo-v1.webp"> </a> <br> <br>
|
| 2 |
+
|
| 3 |
+
[](LICENSE)
|
| 4 |
+
|
| 5 |
+
<h1>Vue Vben Admin</h1>
|
| 6 |
+
</div>
|
| 7 |
+
|
| 8 |
+
[](https://sonarcloud.io/summary/new_code?id=vbenjs_vue-vben-admin)    
|
| 9 |
+
|
| 10 |
+
**日本語** | [English](./README.md) | [中文](./README.zh-CN.md)
|
| 11 |
+
|
| 12 |
+
## 紹介
|
| 13 |
+
|
| 14 |
+
Vue Vben Adminは、最新の`vue3`、`vite`、`TypeScript`などの主流技術を使用して開発された、無料でオープンソースの中・後端テンプレートです。すぐに使える中・後端のフロントエンドソリューションとして、学習の参考にもなります。
|
| 15 |
+
|
| 16 |
+
## アップグレード通知
|
| 17 |
+
|
| 18 |
+
これは最新バージョン5.0であり、以前のバージョンとは互換性がありません。新しいプロジェクトを開始する場合は、最新バージョンを使用することをお勧めします。古いバージョンを表示したい場合は、[v2ブランチ](https://github.com/vbenjs/vue-vben-admin/tree/v2)を使用してください。
|
| 19 |
+
|
| 20 |
+
## 特徴
|
| 21 |
+
|
| 22 |
+
- **最新技術スタック**: Vue 3やViteなどの最先端フロントエンド技術で開発
|
| 23 |
+
- **TypeScript**: アプリケーション規模のJavaScriptのための言語
|
| 24 |
+
- **テーマ**: 複数のテーマカラーが利用可能で、カスタマイズオプションも豊富
|
| 25 |
+
- **国際化**: 完全な内蔵国際化サポート
|
| 26 |
+
- **権限管理**: 動的ルートベースの権限生成ソリューションを内蔵
|
| 27 |
+
|
| 28 |
+
## プレビュー
|
| 29 |
+
|
| 30 |
+
- [Vben Admin](https://vben.pro/) - フルバージョンの中国語サイト
|
| 31 |
+
|
| 32 |
+
テストアカウント: vben/123456
|
| 33 |
+
|
| 34 |
+
<p align="center">
|
| 35 |
+
<img alt="VbenAdmin Logo" width="100%" src="https://anncwb.github.io/anncwb/images/preview1.png">
|
| 36 |
+
<img alt="VbenAdmin Logo" width="100%" src="https://anncwb.github.io/anncwb/images/preview2.png">
|
| 37 |
+
<img alt="VbenAdmin Logo" width="100%" src="https://anncwb.github.io/anncwb/images/preview3.png">
|
| 38 |
+
</p>
|
| 39 |
+
|
| 40 |
+
### Gitpodを使用
|
| 41 |
+
|
| 42 |
+
Gitpod(GitHub用の無料オンライン開発環境)でプロジェクトを開き、すぐにコーディングを開始します。
|
| 43 |
+
|
| 44 |
+
[](https://gitpod.io/#https://github.com/vbenjs/vue-vben-admin)
|
| 45 |
+
|
| 46 |
+
## ドキュメント
|
| 47 |
+
|
| 48 |
+
[ドキュメント](https://doc.vben.pro/)
|
| 49 |
+
|
| 50 |
+
## インストールと使用
|
| 51 |
+
|
| 52 |
+
- プロジェクトコードを取得
|
| 53 |
+
|
| 54 |
+
```bash
|
| 55 |
+
git clone https://github.com/vbenjs/vue-vben-admin.git
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
- 依存関係のインストール
|
| 59 |
+
|
| 60 |
+
```bash
|
| 61 |
+
cd vue-vben-admin
|
| 62 |
+
|
| 63 |
+
corepack enable
|
| 64 |
+
|
| 65 |
+
pnpm install
|
| 66 |
+
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
- 実行
|
| 70 |
+
|
| 71 |
+
```bash
|
| 72 |
+
pnpm dev
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
- ビルド
|
| 76 |
+
|
| 77 |
+
```bash
|
| 78 |
+
pnpm build
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
## 変更ログ
|
| 82 |
+
|
| 83 |
+
[CHANGELOG](https://github.com/vbenjs/vue-vben-admin/releases)
|
| 84 |
+
|
| 85 |
+
## 貢献方法
|
| 86 |
+
|
| 87 |
+
ご参加をお待ちしておりますするか、Pull Requestを送信してください。
|
| 88 |
+
|
| 89 |
+
**Pull Request:**
|
| 90 |
+
|
| 91 |
+
1. コードをフォーク!
|
| 92 |
+
2. 自分のブランチを作成: `git checkout -b feat/xxxx`
|
| 93 |
+
3. 変更をコミット: `git commit -am 'feat(function): add xxxxx'`
|
| 94 |
+
4. ブランチをプッシュ: `git push origin feat/xxxx`
|
| 95 |
+
5. `pull request`を送信
|
| 96 |
+
|
| 97 |
+
## Git貢献提出規則
|
| 98 |
+
|
| 99 |
+
- 参考 [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) 規則 ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular))
|
| 100 |
+
|
| 101 |
+
- `feat` 新機能の追加
|
| 102 |
+
- `fix` 問題/バグの修正
|
| 103 |
+
- `style` コードスタイルに関連し、実行結果に影響しない
|
| 104 |
+
- `perf` 最適化/パフォーマンス向上
|
| 105 |
+
- `refactor` リファクタリング
|
| 106 |
+
- `revert` 変更の取り消し
|
| 107 |
+
- `test` テスト関連
|
| 108 |
+
- `docs` ドキュメント/注釈
|
| 109 |
+
- `chore` 依存関係の更新/スキャフォールディング設定の変更など
|
| 110 |
+
- `ci` 継続的インテグレーション
|
| 111 |
+
- `types` 型定義ファイルの変更
|
| 112 |
+
- `wip` 開発中
|
| 113 |
+
|
| 114 |
+
## ブラウザサポート
|
| 115 |
+
|
| 116 |
+
ローカル開発には`Chrome 80+`ブラウザを推奨します
|
| 117 |
+
|
| 118 |
+
モダンブラウザをサポートし、IEはサポートしません
|
| 119 |
+
|
| 120 |
+
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
|
| 121 |
+
| :-: | :-: | :-: | :-: | :-: |
|
| 122 |
+
| サポートしない | 最新2バージョン | 最新2バージョン | 最新2バージョン | 最新2バージョン |
|
| 123 |
+
|
| 124 |
+
## メンテナー
|
| 125 |
+
|
| 126 |
+
[@Vben](https://github.com/anncwb)
|
| 127 |
+
|
| 128 |
+
## スター歴史
|
| 129 |
+
|
| 130 |
+
[](https://star-history.com/#vbenjs/vue-vben-admin&Date)
|
| 131 |
+
|
| 132 |
+
## 寄付
|
| 133 |
+
|
| 134 |
+
このプロジェクトが役に立つと思われた場合、作者にコーヒーを一杯おごってサポートを示すことができます!
|
| 135 |
+
|
| 136 |
+

|
| 137 |
+
|
| 138 |
+
<a style="display: block;width: 100px;height: 50px;line-height: 50px; color: #fff;text-align: center; background: #408aed;border-radius: 4px;" href="https://www.paypal.com/paypalme/cvvben">Paypal Me</a>
|
| 139 |
+
|
| 140 |
+
## 貢献者
|
| 141 |
+
|
| 142 |
+
<a href="https://github.com/vbenjs/vue-vben-admin/graphs/contributors">
|
| 143 |
+
<img alt="Contributors"
|
| 144 |
+
src="https://opencollective.com/vbenjs/contributors.svg?button=false" />
|
| 145 |
+
</a>
|
| 146 |
+
|
| 147 |
+
## Discord
|
| 148 |
+
|
| 149 |
+
- [Github Discussions](https://github.com/anncwb/vue-vben-admin/discussions)
|
| 150 |
+
|
| 151 |
+
## ライセンス
|
| 152 |
+
|
| 153 |
+
[MIT © Vben-2020](./LICENSE)
|