Skip to content

Commit f8f62e8

Browse files
authored
Initial commit
0 parents  commit f8f62e8

45 files changed

Lines changed: 7840 additions & 0 deletions

Some content is hidden

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

.env.example

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Usage:
2+
# Copy this file as `.env` and fill in the variables below as instructed.
3+
4+
# If you are developing more than one plugin, you can store the bin path and
5+
# profile path in the system environment variables, which can be omitted here.
6+
7+
# The path of the Zotero binary file.
8+
# The path delimiter should be escaped as `\\` for win32.
9+
# The path is `*/Zotero.app/Contents/MacOS/zotero` for MacOS.
10+
ZOTERO_PLUGIN_ZOTERO_BIN_PATH = /path/to/zotero.exe
11+
12+
# The path of the profile used for development.
13+
# Start the profile manager by `/path/to/zotero.exe -p` to create a profile for development.
14+
# @see https://www.zotero.org/support/kb/profile_directory
15+
ZOTERO_PLUGIN_PROFILE_PATH = /path/to/profile
16+
17+
# The directory where the database is located.
18+
# If this field is kept empty, Zotero will start with the default data.
19+
# @see https://www.zotero.org/support/zotero_data
20+
ZOTERO_PLUGIN_DATA_DIR =
21+
22+
# Custom commands to kill Zotero processes.
23+
# Commands for different platforms are already built into zotero-plugin,
24+
# if the built-in commands are not suitable for your needs, please modify this variable.
25+
# ZOTERO_PLUGIN_KILL_COMMAND =
26+
27+
# GitHub Token
28+
# For scaffold auto create release and upload assets.
29+
# Fill in this variable if you are publishing locally instead of CI.
30+
# GITHUB_TOKEN =

.gitattributes

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

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "npm" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
12+
groups:
13+
all-non-major:
14+
update-types:
15+
- "minor"
16+
- "patch"

.github/renovate.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:recommended",
5+
":semanticPrefixChore",
6+
":prHourlyLimitNone",
7+
":prConcurrentLimitNone",
8+
":enableVulnerabilityAlerts",
9+
":dependencyDashboard",
10+
"group:allNonMajor",
11+
"schedule:weekly"
12+
],
13+
"labels": ["dependencies"],
14+
"packageRules": [
15+
{
16+
"matchPackageNames": [
17+
"zotero-plugin-toolkit",
18+
"zotero-types",
19+
"zotero-plugin-scaffold"
20+
],
21+
"schedule": ["at any time"],
22+
"automerge": true
23+
}
24+
],
25+
"git-submodules": {
26+
"enabled": true
27+
}
28+
}

.github/workflows/ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GitHub_TOKEN }}
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
cache: npm
27+
28+
- name: Install deps
29+
run: |
30+
npm install
31+
32+
- name: Run Lint
33+
run: |
34+
npm run lint:check
35+
36+
build:
37+
runs-on: ubuntu-latest
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GitHub_TOKEN }}
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v4
43+
with:
44+
fetch-depth: 0
45+
46+
- name: Setup Node.js
47+
uses: actions/setup-node@v4
48+
with:
49+
node-version: 20
50+
cache: npm
51+
52+
- name: Install deps
53+
run: |
54+
npm install
55+
56+
- name: Run Build
57+
run: |
58+
npm run build
59+
60+
- name: Upload build result
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: build-result
64+
path: |
65+
build

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- v**
7+
8+
permissions:
9+
contents: write
10+
issues: write
11+
pull-requests: write
12+
13+
jobs:
14+
release:
15+
runs-on: ubuntu-latest
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GitHub_TOKEN }}
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
29+
- name: Install deps
30+
run: npm install
31+
32+
- name: Build
33+
run: |
34+
npm run build
35+
36+
- name: Release to GitHub
37+
run: |
38+
npm run release
39+
sleep 1s
40+
41+
- name: Notify release
42+
uses: apexskier/github-release-commenter@v1
43+
continue-on-error: true
44+
with:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
comment-template: |
47+
:rocket: _This ticket has been resolved in {release_tag}. See {release_link} for release notes._

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# dot files
2+
.DS_Store
3+
4+
# Node.js
5+
node_modules
6+
pnpm-lock.yaml
7+
yarn.lock
8+
9+
# TSC
10+
tsconfig.tsbuildinfo
11+
12+
# Scaffold
13+
.env
14+
.scaffold
15+
build
16+
logs

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.vscode
2+
build
3+
logs
4+
node_modules
5+
package-lock.json
6+
yarn.lock
7+
pnpm-lock.yaml

.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+
"dbaeumer.vscode-eslint",
4+
"esbenp.prettier-vscode",
5+
"macabeus.vscode-fluent"
6+
]
7+
}

.vscode/launch.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
// 使用 IntelliSense 了解相关属性。
3+
// 悬停以查看现有属性的描述。
4+
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Start",
11+
"runtimeExecutable": "npm",
12+
"runtimeArgs": ["run", "start"]
13+
},
14+
{
15+
"type": "node",
16+
"request": "launch",
17+
"name": "Build",
18+
"runtimeExecutable": "npm",
19+
"runtimeArgs": ["run", "build"]
20+
}
21+
]
22+
}

0 commit comments

Comments
 (0)