Skip to content

Commit 5b28f63

Browse files
committed
init
Change-Id: I28f0f5943433f218d290b9f97eaad049645fb6d5 Signed-off-by: Jianhui Zhao <[email protected]>
0 parents  commit 5b28f63

30 files changed

+9395
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}]
2+
charset = utf-8
3+
indent_size = 2
4+
indent_style = space
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
8+
end_of_line = lf
9+
max_line_length = 100

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- 'site'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: '20'
21+
22+
- name: Install dependencies
23+
run: npm install
24+
25+
- name: Build rtty site
26+
run: npm run build
27+
28+
- name: Deploy to GitHub Pages
29+
uses: crazy-max/ghaction-github-pages@v2
30+
with:
31+
target_branch: gh-pages
32+
build_dir: dist
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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?
29+
30+
*.tsbuildinfo
31+
32+
.eslintcache

.vscode/extensions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"Vue.volar",
4+
"dbaeumer.vscode-eslint",
5+
"EditorConfig.EditorConfig"
6+
]
7+
}

README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# rtty-site
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).
8+
9+
## Customize configuration
10+
11+
See [Vite Configuration Reference](https://vite.dev/config/).
12+
13+
## Project Setup
14+
15+
```sh
16+
npm install
17+
```
18+
19+
### Compile and Hot-Reload for Development
20+
21+
```sh
22+
npm run dev
23+
```
24+
25+
### Compile and Minify for Production
26+
27+
```sh
28+
npm run build
29+
```
30+
31+
### Lint with [ESLint](https://eslint.org/)
32+
33+
```sh
34+
npm run lint
35+
```
36+
37+
## OpenResty
38+
39+
/etc/openresty/nginx.conf
40+
41+
```nginx
42+
http {
43+
...
44+
include /etc/openresty/rtty-site.conf;
45+
}
46+
```
47+
48+
/etc/openresty/rtty-site.conf
49+
50+
```nginx
51+
server {
52+
listen 443 ssl;
53+
server_name rttys.net;
54+
55+
ssl_certificate /etc/openresty/ssl/rttys.net/cert.pem;
56+
ssl_certificate_key /etc/openresty/ssl/rttys.net/cert.key;
57+
58+
location = /rtty-version.json {
59+
root assets;
60+
}
61+
62+
location /dl/ {
63+
root assets;
64+
}
65+
66+
location / {
67+
root html/rtty-site;
68+
}
69+
}
70+
```
71+
72+
/usr/local/openresty/nginx/assets/rtty-version.json
73+
74+
```json
75+
{"rtty":"9.0.0","rttys":"5.1.0"}
76+
```
77+
78+
/usr/local/openresty/nginx/html/rtty-site/
79+
80+
/usr/local/openresty/nginx/assets/dl/

eslint.config.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import globals from 'globals'
2+
import pluginJs from '@eslint/js'
3+
import pluginVue from 'eslint-plugin-vue'
4+
5+
export default [
6+
{files: ['**/*.{js,mjs,cjs,vue}']},
7+
{languageOptions: { globals: globals.browser }},
8+
pluginJs.configs.recommended,
9+
...pluginVue.configs['flat/essential'],
10+
{
11+
rules: {
12+
'vue/no-multiple-template-root': 'off',
13+
'vue/multi-word-component-names': 'off',
14+
'linebreak-style': ['error', 'unix'],
15+
'quotes': ['error', 'single'],
16+
'brace-style': 'error',
17+
'comma-dangle': 'error',
18+
'comma-spacing': 'error',
19+
'keyword-spacing': 'error',
20+
'no-trailing-spaces': 'error',
21+
'no-unneeded-ternary': 'error',
22+
'space-before-function-paren': ['error', 'never'],
23+
'space-infix-ops': ['error', {'int32Hint': false}],
24+
'arrow-spacing': 'error',
25+
'no-var': 'error',
26+
'no-duplicate-imports': 'error',
27+
'space-before-blocks': 'error',
28+
'space-in-parens': ['error', 'never'],
29+
'no-multi-spaces': 'error',
30+
'eqeqeq': 'error',
31+
'indent': ['error', 2],
32+
'semi': ['error', 'never']
33+
}
34+
}
35+
]

index.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!DOCTYPE html>
2+
<html lang="">
3+
<head>
4+
<meta charset="UTF-8">
5+
<link rel="icon" href="/favicon.ico">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>RTTY</title>
8+
<!-- Google tag (gtag.js) -->
9+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XL0Y56HDK3"></script>
10+
<script>
11+
window.dataLayer = window.dataLayer || [];
12+
function gtag(){dataLayer.push(arguments);}
13+
gtag('js', new Date());
14+
15+
gtag('config', 'G-XL0Y56HDK3');
16+
</script>
17+
<!-- Baidu Analytics -->
18+
<script>
19+
var _hmt = _hmt || [];
20+
(function() {
21+
var hm = document.createElement("script");
22+
hm.src = "https://hm.baidu.com/hm.js?23f1aeaae68adb48e02056ee8aa7b4b9";
23+
var s = document.getElementsByTagName("script")[0];
24+
s.parentNode.insertBefore(hm, s);
25+
})();
26+
</script>
27+
</head>
28+
<body>
29+
<div id="app"></div>
30+
<script type="module" src="/src/main.js"></script>
31+
</body>
32+
</html>

jsconfig.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"compilerOptions": {
3+
"paths": {
4+
"@/*": ["./src/*"]
5+
}
6+
},
7+
"exclude": ["node_modules", "dist"]
8+
}

0 commit comments

Comments
 (0)