Skip to content
This repository was archived by the owner on Oct 17, 2023. It is now read-only.

Commit 5839cf7

Browse files
committed
格式
格式
1 parent ca1d876 commit 5839cf7

26 files changed

+131
-65
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
const axios = require('axios');
2+
const fs = require('fs');
3+
4+
const PR_NUMBER = process.env.GITHUB_EVENT_PATH ? JSON.parse(fs.readFileSync(process.env.GITHUB_EVENT_PATH, 'utf8')).number : null;
5+
const REPO = process.env.GITHUB_REPOSITORY;
6+
7+
console.log(`https://api.github.com/repos/${REPO}/pulls/${PR_NUMBER}/files`);
8+
9+
axios.get(`https://api.github.com/repos/${REPO}/pulls/${PR_NUMBER}/files`, {})
10+
.then(response => {
11+
const files = response.data;
12+
const root_directories = new Set();
13+
14+
files.forEach(file => {
15+
const root_directory = file.filename.split("/")[0];
16+
root_directories.add(root_directory);
17+
});
18+
19+
if (root_directories.size > 1) {
20+
throw new Error("Multiple root directories changed, action failed.");
21+
}
22+
23+
const root_dir = [...root_directories][0];
24+
console.log(`::set-output name=root_directory::${root_dir}`);
25+
})
26+
.catch(error => {
27+
console.error(error.message || 'Error occurred');
28+
process.exit(1);
29+
});

.github/workflows/check-pr.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Check PR Requirements
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
check-pr:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v4
12+
13+
- name: Install Node.js
14+
uses: actions/setup-node@v2
15+
with:
16+
node-version: '14'
17+
18+
- name: Install dependencies
19+
run: |
20+
npm install axios
21+
22+
- name: Get root directory
23+
run: node .github/scripts/get_root_directories.js
24+
id: get-dir

.gitignore

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,3 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
pnpm-debug.log*
8-
lerna-debug.log*
9-
10-
node_modules
11-
.DS_Store
12-
dist
13-
dist-ssr
14-
coverage
15-
*.local
16-
17-
/cypress/videos/
18-
/cypress/screenshots/
19-
20-
# Editor directories and files
21-
.vscode/*
22-
!.vscode/extensions.json
231
.idea
24-
*.suo
25-
*.ntvs*
26-
*.njsproj
27-
*.sln
28-
*.sw?
2+
3+
**/node_modules/

README.md

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,10 @@
1-
# test
1+
# frontend_2023_freshman_task
22

3-
This template should help get you started developing with Vue 3 in Vite.
3+
2023 杭助前端招新小任务提交仓库
44

5-
## Recommended IDE Setup
6-
7-
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
8-
9-
## Type Support for `.vue` Imports in TS
10-
11-
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
12-
13-
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
14-
15-
1. Disable the built-in TypeScript Extension
16-
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17-
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18-
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
19-
20-
## Customize configuration
21-
22-
See [Vite Configuration Reference](https://vitejs.dev/config/).
23-
24-
## Project Setup
25-
26-
```sh
27-
yarn
28-
```
29-
30-
### Compile and Hot-Reload for Development
31-
32-
```sh
33-
yarn dev
34-
```
35-
36-
### Type-Check, Compile and Minify for Production
37-
38-
```sh
39-
yarn build
40-
```
5+
- fork本仓库
6+
- git clone 你 fork 出来的仓库
7+
- 在仓库根目录下新建一个和你 github 用户名同名的文件夹
8+
- 在此文件夹内,放入你的代码
9+
- 提交 Pull request
10+
- github action通过后,即为提交成功

cksheuen/.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
.DS_Store
12+
dist
13+
dist-ssr
14+
coverage
15+
*.local
16+
17+
/cypress/videos/
18+
/cypress/screenshots/
19+
20+
# Editor directories and files
21+
.vscode/*
22+
!.vscode/extensions.json
23+
.idea
24+
*.suo
25+
*.ntvs*
26+
*.njsproj
27+
*.sln
28+
*.sw?
File renamed without changes.

cksheuen/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# test
2+
3+
This template should help get you started developing with Vue 3 in Vite.
4+
5+
## Recommended IDE Setup
6+
7+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
8+
9+
## Type Support for `.vue` Imports in TS
10+
11+
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
12+
13+
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
14+
15+
1. Disable the built-in TypeScript Extension
16+
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17+
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18+
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
19+
20+
## Customize configuration
21+
22+
See [Vite Configuration Reference](https://vitejs.dev/config/).
23+
24+
## Project Setup
25+
26+
```sh
27+
yarn
28+
```
29+
30+
### Compile and Hot-Reload for Development
31+
32+
```sh
33+
yarn dev
34+
```
35+
36+
### Type-Check, Compile and Minify for Production
37+
38+
```sh
39+
yarn build
40+
```
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)