mjpic 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,57 +1,42 @@
1
- # React + TypeScript + Vite
2
-
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
-
5
- Currently, two official plugins are available:
6
-
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
-
10
- ## Expanding the ESLint configuration
11
-
12
- If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
13
-
14
- ```js
15
- export default tseslint.config({
16
- extends: [
17
- // Remove ...tseslint.configs.recommended and replace with this
18
- ...tseslint.configs.recommendedTypeChecked,
19
- // Alternatively, use this for stricter rules
20
- ...tseslint.configs.strictTypeChecked,
21
- // Optionally, add this for stylistic rules
22
- ...tseslint.configs.stylisticTypeChecked,
23
- ],
24
- languageOptions: {
25
- // other options...
26
- parserOptions: {
27
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
28
- tsconfigRootDir: import.meta.dirname,
29
- },
30
- },
31
- })
1
+ # 敏捷图片 (mjpic)
2
+
3
+ 敏捷图片(mjpic)是一个轻量级网页版图片处理工具,设计灵感来源于光影魔术手。
4
+
5
+ ## 特性
6
+
7
+ - **轻量级**:无需安装庞大的软件,即开即用。
8
+ - **本地处理**:图片不上传服务器,保护隐私。
9
+ - **功能丰富**:支持裁剪、旋转、尺寸调整、边框添加等常用功能。
10
+ - **CLI 支持**:提供命令行工具,方便快速打开和处理图片。
11
+
12
+ ## 安装
13
+
14
+ ```bash
15
+ npm install -g mjpic
32
16
  ```
33
17
 
34
- You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
35
-
36
- ```js
37
- // eslint.config.js
38
- import reactX from 'eslint-plugin-react-x'
39
- import reactDom from 'eslint-plugin-react-dom'
40
-
41
- export default tseslint.config({
42
- extends: [
43
- // other configs...
44
- // Enable lint rules for React
45
- reactX.configs['recommended-typescript'],
46
- // Enable lint rules for React DOM
47
- reactDom.configs.recommended,
48
- ],
49
- languageOptions: {
50
- // other options...
51
- parserOptions: {
52
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
53
- tsconfigRootDir: import.meta.dirname,
54
- },
55
- },
56
- })
18
+ ## 使用
19
+
20
+ ### 命令行模式
21
+
22
+ 打开指定图片:
23
+ ```bash
24
+ mjpic path/to/image.jpg
57
25
  ```
26
+
27
+ 启动服务:
28
+ ```bash
29
+ mjpic start
30
+ # 或
31
+ mjpic dev
32
+ ```
33
+
34
+ ### 网页模式
35
+
36
+ 访问部署后的网页即可使用。
37
+
38
+ ## 开发
39
+
40
+ 1. 克隆仓库
41
+ 2. 安装依赖:`npm install`
42
+ 3. 启动开发服务器:`npm run dev`
package/api/cli.ts CHANGED
@@ -53,8 +53,8 @@ const startServer = async (options: { port: string; host: string }, file?: strin
53
53
 
54
54
  program
55
55
  .name('mjpic')
56
- .description('敏捷图片 - 轻量级图片处理工具')
57
- .version('1.0.5');
56
+ .description('敏捷图片(mjpic)是一个轻量级网页版图片处理工具,设计灵感来源于光影魔术手。')
57
+ .version('1.0.6');
58
58
 
59
59
  const attachServeOptions = (cmd: Command) => {
60
60
  cmd
package/dist/cli/cli.js CHANGED
@@ -43,8 +43,8 @@ const startServer = async (options, file) => {
43
43
  };
44
44
  program
45
45
  .name('mjpic')
46
- .description('敏捷图片 - 轻量级图片处理工具')
47
- .version('1.0.5');
46
+ .description('敏捷图片(mjpic)是一个轻量级网页版图片处理工具,设计灵感来源于光影魔术手。')
47
+ .version('1.0.6');
48
48
  const attachServeOptions = (cmd) => {
49
49
  cmd
50
50
  .option('-p, --port <number>', 'server port', '3000')
@@ -4,7 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>敏捷图片 - mjpic</title>
7
+ <meta name="description" content="敏捷图片(mjpic)是一个轻量级网页版图片处理工具,设计灵感来源于光影魔术手。" />
8
+ <title>敏捷图片 (mjpic) - 轻量级网页版图片处理工具</title>
8
9
  <script type="module" crossorigin src="/assets/index-BQfYCBRX.js"></script>
9
10
  <link rel="stylesheet" crossorigin href="/assets/index-BoiS81Ei.css">
10
11
  </head>
package/index.html CHANGED
@@ -4,7 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>敏捷图片 - mjpic</title>
7
+ <meta name="description" content="敏捷图片(mjpic)是一个轻量级网页版图片处理工具,设计灵感来源于光影魔术手。" />
8
+ <title>敏捷图片 (mjpic) - 轻量级网页版图片处理工具</title>
8
9
  <script type="module">
9
10
  if (import.meta.hot?.on) {
10
11
  import.meta.hot.on('vite:error', (error) => {
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "mjpic",
3
- "version": "1.0.5",
3
+ "description": "敏捷图片(mjpic)是一个轻量级网页版图片处理工具,设计灵感来源于光影魔术手。",
4
+ "version": "1.0.6",
4
5
  "type": "module",
5
6
  "bin": {
6
7
  "mjpic": "./dist/cli/cli.js"