Skip to content

Commit

Permalink
Merge branch 'main' into fix/csl-download
Browse files Browse the repository at this point in the history
  • Loading branch information
northword committed Jun 29, 2024
2 parents 1d125cf + fa7cbeb commit eab36db
Show file tree
Hide file tree
Showing 77 changed files with 4,483 additions and 3,607 deletions.
25 changes: 0 additions & 25 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
"schedule:weekly",
"schedule:monthly",
"group:allNonMajor",
":prHourlyLimitNone",
":prConcurrentLimitNone"
Expand Down
41 changes: 21 additions & 20 deletions .github/scripts/fetch-data.mjs
Original file line number Diff line number Diff line change
@@ -1,41 +1,42 @@
import fs from "fs-extra";
import path from "path";
import { exit } from "process";
/* eslint-disable no-console */
import path from 'node:path'
import { exit } from 'node:process'
import fs from 'fs-extra'

const data_list = [
{
local_path: "src/plugins/data/plugins.json",
local_path: 'src/plugins/data/plugins.json',
remote_url:
"https://raw.githubusercontent.com/zotero-chinese/zotero-plugins/gh-pages/dist/plugins.json",
'https://raw.githubusercontent.com/zotero-chinese/zotero-plugins/gh-pages/dist/plugins.json',
},
{
local_path: "src/plugins/data/update-time.json",
local_path: 'src/plugins/data/update-time.json',
remote_url:
"https://raw.githubusercontent.com/zotero-chinese/zotero-plugins/gh-pages/dist/shields.json",
'https://raw.githubusercontent.com/zotero-chinese/zotero-plugins/gh-pages/dist/shields.json',
},
{
local_path: "src/plugins/data/charts.json",
local_path: 'src/plugins/data/charts.json',
remote_url:
"https://raw.githubusercontent.com/zotero-chinese/zotero-plugins/gh-pages/dist/charts.json",
'https://raw.githubusercontent.com/zotero-chinese/zotero-plugins/gh-pages/dist/charts.json',
},
{
local_path: "src/translators/data/dashboard.json",
local_path: 'src/translators/data/dashboard.json',
remote_url:
"https://raw.githubusercontent.com/l0o0/translators_CN/master/data/dashboard.json",
'https://raw.githubusercontent.com/l0o0/translators_CN/master/data/dashboard.json',
},
];
]

const tasks = data_list.map(async (d) => {
const data = await (await fetch(d.remote_url)).json();
fs.outputJSONSync(path.resolve(d.local_path), data);
console.log(`Download ${d.local_path} success!`);
});
const data = await (await fetch(d.remote_url)).json()
fs.outputJSONSync(path.resolve(d.local_path), data)
console.log(`Download ${d.local_path} success!`)
})

Promise.all(tasks)
.then(() => {
console.log("Done!");
console.log('Done!')
})
.catch((e) => {
console.error(e);
exit(1);
});
console.error(e)
exit(1)
})
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
cache: pnpm

- name: Install deps
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ jobs:
id: netlify
uses: nwtgck/actions-netlify@v3.0
with:
publish-dir: "dist"
deploy-message: "Deploy from GitHub Actions"
publish-dir: dist
deploy-message: Deploy from GitHub Actions
production-deploy: true
enable-commit-comment: false
enable-pull-request-comment: false
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: 下载工作流信息
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@v6
with:
workflow_conclusion: success
run_id: ${{ github.event.workflow_run.id }}
Expand All @@ -33,7 +33,7 @@ jobs:
echo "PR_NUM=$(cat pr-num/pr_num)" >> $GITHUB_ENV
- name: 下载构建内容
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@v6
with:
workflow_conclusion: success
run_id: ${{ github.event.workflow_run.id }}
Expand All @@ -45,8 +45,8 @@ jobs:
id: netlify
uses: nwtgck/actions-netlify@v3.0
with:
publish-dir: "dist"
deploy-message: "Deploy from GitHub Actions"
publish-dir: dist
deploy-message: Deploy from GitHub Actions
production-deploy: false
alias: deploy-preview-${{ env.PR_NUM }}
enable-commit-comment: false
Expand All @@ -63,7 +63,7 @@ jobs:
id: fc
with:
issue-number: ${{ env.PR_NUM }}
comment-author: "github-actions[bot]"
comment-author: 'github-actions[bot]'
body-includes: <!-- auto message -->

- name: 创建或更新评论
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- name: 下载构建内容 (工作流信息)
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@v6
with:
workflow_conclusion: success
run_id: ${{ github.event.workflow_run.id }}
Expand All @@ -110,7 +110,7 @@ jobs:
id: fc
with:
issue-number: ${{ env.PR_NUM }}
comment-author: "github-actions[bot]"
comment-author: 'github-actions[bot]'
body-includes: <!-- auto message -->

- name: 创建或更新评论:失败
Expand Down
3 changes: 1 addition & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
branch = main
[submodule "src/styles/detail"]
path = src/styles/detail
url = https://github.com/redleafnew/Chinese-STD-GB-T-7714-related-csl.git
branch = main
url = https://github.com/zotero-chinese/styles.git
29 changes: 0 additions & 29 deletions .prettierignore

This file was deleted.

7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

Loading

0 comments on commit eab36db

Please sign in to comment.