-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: 迁移源码到挂件仓库 siyuan-note/bazaar#1095
- Loading branch information
Showing
410 changed files
with
174,685 additions
and
1,674 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# 是否开启info日志,true | false,建议生产环境设置为false | ||
VITE_LOG_INFO_ENABLED=true | ||
|
||
# 思源笔记授权api | ||
# VITE_SIYUAN_API_URL=http://127.0.0.1:6806 | ||
# 思源笔记授权token | ||
# VITE_SIYUAN_CONFIG_TOKEN= | ||
|
||
# 开发阶段模拟的页面ID,仅限调试使用,生产环境无需此配置 | ||
# VITE_SIYUAN_DEV_PAGE_ID=20220927094918-1d85uyp | ||
# VITE_SIYUAN_DEV_PAGE_ID= | ||
|
||
# 图表服务器 | ||
# PLANT_UML_SERVR=https://www.plantuml.com/plantuml/svg/ | ||
# PLANT_UML_SERVR= | ||
|
||
# 非挂件模式需要中间服务器实现跨域,生产环境可不设置,使用本项目 | ||
# VITE_MIDDLEWARE_URL=https://api.terwer.space/api/middleware | ||
# VITE_MIDDLEWARE_URL= | ||
|
||
# VITE_DEBUG_MODE=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 是否开启info日志,true | false,建议生产环境设置为false | ||
VITE_LOG_INFO_ENABLED=false | ||
|
||
# 思源笔记授权api | ||
# VITE_SIYUAN_API_URL=http://127.0.0.1:6806 | ||
# 思源笔记授权token | ||
# VITE_SIYUAN_CONFIG_TOKEN= | ||
|
||
# 开发阶段模拟的页面ID,仅限调试使用,生产环境无需此配置 | ||
# VITE_SIYUAN_DEV_PAGE_ID= | ||
|
||
# 图表服务器 | ||
# PLANT_UML_SERVR=https://www.plantuml.com/plantuml/svg/ | ||
# PLANT_UML_SERVR= | ||
|
||
# 非挂件模式需要中间服务器实现跨域,生产环境可不设置,使用本项目 | ||
# VITE_MIDDLEWARE_URL=https://api.terwer.space/api/middleware | ||
# VITE_MIDDLEWARE_URL= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# 是否开启info日志,true | false,建议生产环境设置为false | ||
VITE_LOG_INFO_ENABLED=true | ||
VITE_DEBUG_MODE=false | ||
|
||
# 思源笔记授权api | ||
# VITE_SIYUAN_API_URL=http://127.0.0.1:6806 | ||
# 思源笔记授权token | ||
# VITE_SIYUAN_CONFIG_TOKEN= | ||
|
||
# 开发阶段模拟的页面ID,仅限调试使用,生产环境无需此配置 | ||
# VITE_SIYUAN_DEV_PAGE_ID= | ||
|
||
# 图表服务器 | ||
# PLANT_UML_SERVR=https://www.plantuml.com/plantuml/svg/ | ||
# PLANT_UML_SERVR= | ||
|
||
# 非挂件模式需要中间服务器实现跨域,生产环境可不设置,使用本项目 | ||
# VITE_MIDDLEWARE_URL=https://api.terwer.space/api/middleware | ||
# VITE_MIDDLEWARE_URL= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# 是否开启info日志,true | false,建议生产环境设置为false | ||
VITE_LOG_INFO_ENABLED=true | ||
|
||
# 思源笔记授权api | ||
VITE_SIYUAN_API_URL=http://127.0.0.1:6806 | ||
# 思源笔记授权token | ||
VITE_SIYUAN_CONFIG_TOKEN= | ||
|
||
# 开发阶段模拟的页面ID,仅限调试使用,生产环境无需此配置 | ||
# VITE_SIYUAN_DEV_PAGE_ID=20220927094918-1d85uyp | ||
|
||
# 非挂件模式需要中间服务器实现跨域,生产环境可不设置,使用本项目 | ||
# VITE_MIDDLEWARE_URL=https://api.terwer.space/api/middleware | ||
# VITE_MIDDLEWARE_URL= | ||
|
||
# ==================================== | ||
# 下面是测试专属 | ||
# ==================================== | ||
VITE_TEST_WORDPRESS_PASSWORD= | ||
VITE_TEST_LIANDI_TOKEN= | ||
VITE_TEST_GITHUB_TOKEN= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": ["eslint:recommended", "plugin:vue/vue3-essential", "standard-with-typescript", "prettier"], | ||
"overrides": [], | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module", | ||
"parser": "@typescript-eslint/parser", | ||
"project": "./tsconfig.json", | ||
"extraFileExtensions": [".vue"] | ||
}, | ||
"plugins": ["@typescript-eslint", "vue"], | ||
"ignorePatterns": ["node_modules/", ".vercel/", ".idea/", "*.js", "*.d.ts", "*.mts", "*.map", "vite.config.ts"], | ||
"rules": { | ||
"vue/multi-word-component-names": "off", | ||
"@typescript-eslint/strict-boolean-expressions": 0, | ||
"@typescript-eslint/triple-slash-reference": 0, | ||
"@typescript-eslint/restrict-template-expressions": 1, | ||
"@typescript-eslint/no-var-requires": 1, | ||
"@typescript-eslint/prefer-nullish-coalescing": 0, | ||
"@typescript-eslint/restrict-plus-operands": 0, | ||
"no-undef": 0, | ||
"no-undef-init": 1, | ||
"no-undefined": 0, | ||
"no-prototype-builtins": 1, | ||
"no-unused-expressions": 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version: 2 | ||
updates: | ||
# Fetch and update latest `npm` packages | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "00:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- terwer | ||
assignees: | ||
- terwer | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
# Fetch and update latest `github-actions` pkgs | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "00:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- terwer | ||
assignees: | ||
- terwer | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Always validate the PR title AND all the commits | ||
titleAndCommits: true | ||
# Allows use of Merge commits (eg on github: "Merge branch 'master' into feature/ride-unicorns") | ||
# this is only relevant when using commitsOnly: true (or titleAndCommits: true) | ||
allowMergeCommits: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 7 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies and build for production | ||
run: pnpm install && pnpm new && pnpm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
name: release-please | ||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# create release pr | ||
- uses: google-github-actions/release-please-action@v3 | ||
with: | ||
release-type: node | ||
package-name: release-please-action | ||
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false}]' | ||
- run: echo "A release was created." | ||
if: ${{ steps.release.outputs.releases_created }} | ||
# For root level packages: ${{ steps.release.outputs.package-a--tag_name }} | ||
- run: echo "Release ${{ steps.release.outputs['packages/package-a--tag_name'] }} created for package-a." | ||
if: ${{ steps.release.outputs['packages/package-a--release_created'] }} | ||
|
||
# create tag | ||
- uses: actions/checkout@v3 | ||
- name: tag major and minor versions | ||
if: ${{ steps.release.outputs.release_created }} | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git" | ||
git tag -d v${{ steps.release.outputs.major }} || true | ||
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true | ||
git push origin :v${{ steps.release.outputs.major }} || true | ||
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true | ||
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}" | ||
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}" | ||
git push origin v${{ steps.release.outputs.major }} | ||
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env sh | ||
# | ||
# Copyright (c) 2022, Terwer . All rights reserved. | ||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
# | ||
# This code is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU General Public License version 2 only, as | ||
# published by the Free Software Foundation. Terwer designates this | ||
# particular file as subject to the "Classpath" exception as provided | ||
# by Terwer in the LICENSE file that accompanied this code. | ||
# | ||
# This code is distributed in the hope that it will be useful, but WITHOUT | ||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
# version 2 for more details (a copy is included in the LICENSE file that | ||
# accompanied this code). | ||
# | ||
# You should have received a copy of the GNU General Public License version | ||
# 2 along with this work; if not, write to the Free Software Foundation, | ||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
# | ||
# Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com | ||
# or visit www.terwer.space if you need additional information or have any | ||
# questions. | ||
# | ||
|
||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
shamefully-hoist=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# platform | ||
.github | ||
.husky | ||
.settings | ||
.vercel | ||
.vscode | ||
|
||
# Ignore artifacts: | ||
build | ||
coverage | ||
dist | ||
extension | ||
node_modules | ||
out | ||
|
||
# Ignore all HTML files: | ||
*.html | ||
|
||
# lib | ||
*.min.js | ||
*mathjax* | ||
/pnpm-lock.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": false, | ||
"printWidth": 120 | ||
} |
Oops, something went wrong.