Skip to content

Commit

Permalink
feat: #27 使用插件系统挂载菜单-优化插件系统集成
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Mar 4, 2023
1 parent a9deaac commit 31c7089
Show file tree
Hide file tree
Showing 28 changed files with 397 additions and 2,724 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

🛍️ 一款源自知乎且自带插件和博客的思源笔记主题

![](https://static.terwergreen.com/test/202303050157804.png)

![](https://static.terwergreen.com/test/202303050156263.png)

## 版本适配

思源笔记 <sup>2.7.6+</sup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,30 @@
* questions.
*/

const initTranslucify = () => {
return []
// return [
// "/appearance/themes/zhi/dist-cjs/lib/vendor/translucify/translucify.js",
// ]
}
import { defineConfig } from "vite"
import { commonConfig } from "../vite.config"

const translucify = {
initTranslucify,
const outputMap: any = {
pluginSystemHook: {
file: "src/apps/zhi/plugin-system/plugin-system-hook.ts",
folder: "plugin-system-hook.js"
}
}

module.exports = translucify
// https://vitejs.dev/config/
export default defineConfig({
...commonConfig,
build: {
rollupOptions: {
input: {
pluginSystemHook: outputMap["pluginSystemHook"].file
},
output: {
format: "cjs",
entryFileNames: (entry) => {
return outputMap[entry.name].folder
}
}
}
}
})
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link href="/vite.svg" rel="icon" type="image/svg+xml" />
<link href="/src/assets/vite.svg" rel="icon" type="image/svg+xml" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>基于思源笔记的在线博客</title>
</head>
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@
"watch:css": "stylus -w theme.styl -o theme.css",
"watch:js": "tsc && vite build -c vite.cjs.config.ts --outDir dist-cjs --watch",
"build": "python script/build.py",
"build:css": "python script/css.py",
"build:cjs": "python script/cjs.py",
"build:esm": "python script/esm.py",
"build:css": "python script/css.py",
"preview": "vite preview",
"test": "vitest",
"coverage": "vitest run --coverage",
"new": "python script/version.py 1.0.0"
},
"dependencies": {
"loglevel": "^1.8.1",
"loglevel-plugin-prefix": "^0.8.4",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
23 changes: 18 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions public/lib/fonts/jb-mono.css

This file was deleted.

Loading

0 comments on commit 31c7089

Please sign in to comment.