From cb035037124c0ea917c7799078b67fee5b81f193 Mon Sep 17 00:00:00 2001 From: Tron Date: Sat, 12 Oct 2024 10:19:33 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20v1.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- CHANGELOG.md | 25 ++++++++++++++----------- README_zh_CN.md | 2 +- plugin.json | 2 +- src/assets/formatPainter_mouse2.png | Bin 0 -> 461 bytes src/index.ts | 1 + webpack.config.js | 20 +++++++++++++------- 7 files changed, 31 insertions(+), 21 deletions(-) create mode 100644 src/assets/formatPainter_mouse2.png diff --git a/.gitignore b/.gitignore index b668a03..f31eeba 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,6 @@ index.css index.js /i18n release.sh - +/assets #pnpm pnpm-lock.yaml \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d28ccf9..2c4d69f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,25 +1,28 @@ # Changelog +## v1.1.0 / 2024.10.12 +- 🐛 更改webpack.config.js,修复index.css和assets没有被打包的问题 + ## v1.0.9 / 2024.10.11 -- 当格式刷启动时候,dock底栏最右侧添加一个按钮,按钮图案渐变闪烁,点击该按钮可以退出格式刷模式([pull request](https://github.com/Achuan-2/siyuan-plugin-formatPainter/pull/1)) +- ✨当格式刷启动时候,dock底栏最右侧添加一个按钮,按钮图案渐变闪烁,点击该按钮可以退出格式刷模式([pull request](https://github.com/Achuan-2/siyuan-plugin-formatPainter/pull/1)) ## v1.0.8 / 2024.10.11 -- 排除对超链接、块引的格式刷 -- 支持公式的格式刷 +- ✨排除对超链接、块引的格式刷 +- ✨支持公式的格式刷 ## v1.0.5 / 2024.10.10 -- 支持镂空和投影样式 +- ✨支持镂空和投影样式 ## v1.0.4 / 2024.10.10 -- 更改逻辑,添加样式前,先清除所有样式 -- 启动格式刷更改鼠标光标 -- 启动格式刷自动关闭工具栏 +- ✨更改逻辑,添加样式前,先清除所有样式 +- ✨启动格式刷更改鼠标光标 +- ✨启动格式刷自动关闭工具栏 ## v1.0.3 / 2024.10.10 -- 完善README +- 📝 完善README ## v1.0.2 / 2024.10.10 -- 支持格式刷字体大小 +- ✨支持格式刷字体大小 ## v1.0.0 / 2024.10.10 🎉 第一次提交 -- 支持格式刷功能 -- 已知bug:不支持数学公式格式刷 +- ✨支持格式刷功能 +- 🐛 已知bug:不支持数学公式格式刷 diff --git a/README_zh_CN.md b/README_zh_CN.md index b9a854e..6d8edd6 100644 --- a/README_zh_CN.md +++ b/README_zh_CN.md @@ -10,7 +10,7 @@ ## ✨功能介绍 -- **进入格式刷模式**:选中文字,在悬浮工具栏点击「格式刷」按钮即可复制样式(支持叠加的样式),之后选中其他文字后自动快速添加复制的样式 +- **进入格式刷模式**:选中文字,在悬浮工具栏点击「格式刷」按钮即可复制样式(支持叠加的样式),之后选中其他文字后,可以自动快速添加复制的样式 - **支持复制的行内样式**:字体大小、背景色、文字颜色、镂空、投影、加粗、行内代码、键盘样式、下划线、删除线、上标、下标、高亮等 - **支持复制无样式用来清空选中的文本样式** - **退出格式刷模式**: diff --git a/plugin.json b/plugin.json index fa43a41..dd3b6c7 100644 --- a/plugin.json +++ b/plugin.json @@ -2,7 +2,7 @@ "name": "siyuan-plugin-formatPainter", "author": "Achuan-2", "url": "https://github.com/Achuan-2/siyuan-plugin-formatPainter", - "version": "1.0.9", + "version": "1.1.0", "minAppVersion": "3.0.12", "backends": [ "windows", diff --git a/src/assets/formatPainter_mouse2.png b/src/assets/formatPainter_mouse2.png new file mode 100644 index 0000000000000000000000000000000000000000..43ade6c71e87a311fcefc8007d948ed3fffb7fdd GIT binary patch literal 461 zcmV;;0W$uHP)Px$he|qlCdoy|0 zl(u#=wRYd&I{-CDFt)(rq#i9Eq3LDaZ#)z^{TuLTX@LJ3EO+eu{48~ajO$`U7&ub_ z5D;a}W$w5F*p5^Ym^BA%0^5umF?VHBti2uE3@r1R@+K3-JbmjoCoWl;24(7iF)Ztq z3@i&n6SYqUj~6Qj#qalxR$1Uqr7m+=KLGF|ShM9mx!3TOC?JTg`P0p00000NkvXXu0mjf D042q) literal 0 HcmV?d00001 diff --git a/src/index.ts b/src/index.ts index dd4b3b3..f87f260 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,6 +11,7 @@ import { + export default class PluginSample extends Plugin { private isMobile: boolean; private formatPainterEnable = false; diff --git a/webpack.config.js b/webpack.config.js index 9ee4986..a6ee8d2 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,7 +1,7 @@ const path = require("path"); const fs = require("fs"); const webpack = require("webpack"); -const {EsbuildPlugin} = require("esbuild-loader"); +const { EsbuildPlugin } = require("esbuild-loader"); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const CopyPlugin = require("copy-webpack-plugin"); const ZipPlugin = require("zip-webpack-plugin"); @@ -26,12 +26,15 @@ module.exports = (env, argv) => { }, })); plugins.push(new CopyPlugin({ + // 用途:把文件放在dist,用来打包 patterns: [ - {from: "preview.png", to: "./dist/"}, - {from: "icon.png", to: "./dist/"}, - {from: "README*.md", to: "./dist/"}, - {from: "plugin.json", to: "./dist/"}, - {from: "src/i18n/", to: "./dist/i18n/"}, + { from: "preview.png", to: "./dist/" }, + { from: "icon.png", to: "./dist/" }, + { from: "README*.md", to: "./dist/" }, + { from: "plugin.json", to: "./dist/" }, + { from: "src/i18n/", to: "./dist/i18n/" }, + { from: "src/index.css", to: "./dist/" }, // Add this line + { from: "src/assets/", to: "./dist/assets/" } // Add this line ], })); plugins.push(new ZipPlugin({ @@ -44,8 +47,11 @@ module.exports = (env, argv) => { })); } else { plugins.push(new CopyPlugin({ + // 用途:run dev的时候放在当前目录,可以直接运行 patterns: [ - {from: "src/i18n/", to: "./i18n/"}, + { from: "src/i18n/", to: "./i18n/" }, + { from: "src/index.css", to: "./" }, // Add this line + { from: "src/assets/", to: "./assets/" } // Add this line ], })); }