Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit 99803d1

Browse files
committed
feat: init
0 parents  commit 99803d1

File tree

560 files changed

+105819
-0
lines changed

Some content is hidden

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

560 files changed

+105819
-0
lines changed

.env.development

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_API_BASE_URL= '/v1'

.env.mock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_API_BASE_URL= '/v1'

.env.production

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_API_BASE_URL= '/v1'

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/*.json
2+
/*.js
3+
/src/views/profile/basic/components/profile-item.vue
4+
dist

.eslintrc.js

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// eslint-disable-next-line @typescript-eslint/no-var-requires
2+
const path = require('path');
3+
4+
module.exports = {
5+
root: true,
6+
parser: 'vue-eslint-parser',
7+
parserOptions: {
8+
// Parser that checks the content of the <script> tag
9+
parser: '@typescript-eslint/parser',
10+
sourceType: 'module',
11+
ecmaVersion: 2020,
12+
ecmaFeatures: {
13+
jsx: true,
14+
},
15+
},
16+
env: {
17+
'browser': true,
18+
'node': true,
19+
'vue/setup-compiler-macros': true,
20+
},
21+
plugins: ['@typescript-eslint'],
22+
extends: [
23+
// Airbnb JavaScript Style Guide https://github.com/airbnb/javascript
24+
'airbnb-base',
25+
'plugin:@typescript-eslint/recommended',
26+
'plugin:import/recommended',
27+
'plugin:import/typescript',
28+
'plugin:vue/vue3-recommended',
29+
'plugin:prettier/recommended',
30+
],
31+
settings: {
32+
'import/resolver': {
33+
typescript: {
34+
project: path.resolve(__dirname, './tsconfig.json'),
35+
},
36+
},
37+
},
38+
rules: {
39+
'@typescript-eslint/no-var-requires': 0,
40+
'prettier/prettier': 1,
41+
'no-nest-ternary': 0,
42+
'class-methods-use-this': 'off',
43+
// Vue: Recommended rules to be closed or modify
44+
'vue/require-default-prop': 0,
45+
'vue/singleline-html-element-content-newline': 0,
46+
'vue/max-attributes-per-line': 0,
47+
// Vue: Add extra rules
48+
'vue/custom-event-name-casing': [2, 'camelCase'],
49+
'vue/no-v-text': 1,
50+
'vue/padding-line-between-blocks': 1,
51+
'vue/require-direct-export': 1,
52+
'vue/multi-word-component-names': 0,
53+
// Allow @ts-ignore comment
54+
'camelcase': 'off',
55+
'@typescript-eslint/camelcase': 0,
56+
'@typescript-eslint/ban-ts-comment': 0,
57+
'@typescript-eslint/no-unused-vars': 0,
58+
'@typescript-eslint/no-empty-function': 1,
59+
'no-underscore-dangle': ['off'],
60+
'@typescript-eslint/no-explicit-any': ['off'],
61+
'dot-notation': 0,
62+
'import/extensions': [
63+
2,
64+
'ignorePackages',
65+
{
66+
js: 'never',
67+
jsx: 'never',
68+
ts: 'never',
69+
tsx: 'never',
70+
},
71+
],
72+
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
73+
'no-param-reassign': 0,
74+
'prefer-regex-literals': 0,
75+
'import/no-extraneous-dependencies': 0,
76+
},
77+
};

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build and publish
2+
on:
3+
push:
4+
branches:
5+
- 'master'
6+
tags:
7+
- 'v*.*.*'
8+
pull_request:
9+
branches:
10+
- 'master'
11+
jobs:
12+
build:
13+
timeout-minutes: 30
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
- name: Set up node
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: '17'
22+
- name: Build latest
23+
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master'
24+
env:
25+
COS_BUCKET: ${{ secrets.COS_BUCKET }}
26+
COS_REGION: ${{ secrets.COS_REGION }}
27+
run: scripts/build-hosted
28+
- name: Publish latest
29+
uses: TencentCloud/cos-action@b0aa648235fb35a1bdd6a77f529eb0ac4c2f1c25
30+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
31+
with:
32+
secret_id: ${{ secrets.CI_TECENTCOS_SECRET_ID }}
33+
secret_key: ${{ secrets.CI_TECENTCOS_SECRET_KEY }}
34+
cos_bucket: ${{ secrets.COS_BUCKET }}
35+
cos_region: ${{ secrets.COS_REGION }}
36+
local_path: dist
37+
remote_path: latest
38+
accelerate: true
39+
clean: false
40+
- name: Build release
41+
if: startsWith(github.ref, 'refs/tags/v')
42+
run: scripts/build-embedded
43+
- name: Publish release
44+
uses: TencentCloud/cos-action@b0aa648235fb35a1bdd6a77f529eb0ac4c2f1c25
45+
if: startsWith(github.ref, 'refs/tags/v')
46+
with:
47+
secret_id: ${{ secrets.CI_TECENTCOS_SECRET_ID }}
48+
secret_key: ${{ secrets.CI_TECENTCOS_SECRET_KEY }}
49+
cos_bucket: ${{ secrets.COS_BUCKET }}
50+
cos_region: ${{ secrets.COS_REGION }}
51+
local_path: dist/${{ github.ref_name }}.tar.gz
52+
remote_path: releases/${{ github.ref_name }}.tar.gz
53+
accelerate: true
54+
clean: false

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
*.local
6+
node_modules
7+
.DS_Store
8+
dist
9+
dist-ssr
10+
*.local

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn commitlint --edit $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run lint-staged

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/dist/*
2+
.local
3+
.output.js
4+
/node_modules/**
5+
6+
**/*.svg
7+
**/*.sh

0 commit comments

Comments
 (0)