meocli 0.1.0 → 0.1.1

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
@@ -9,7 +9,9 @@ A new CLI generated with oclif
9
9
  <!-- toc -->
10
10
  * [meocli](#meocli)
11
11
  * [Dev](#dev)
12
+ * [安装使用](#安装使用)
12
13
  * [Publish](#publish)
14
+ * [Vscode](#vscode)
13
15
  * [Usage](#usage)
14
16
  * [Commands](#commands)
15
17
  <!-- tocstop -->
@@ -17,14 +19,27 @@ A new CLI generated with oclif
17
19
  # Dev
18
20
 
19
21
  ```sh-session
22
+ <!-- pnpm exec -->
23
+ $ pnpm ncu # 检查更新
24
+ $ pnpm ncu -u # 升级更新
20
25
  <!-- demo -->
21
26
  $ pnpm run dev hello world
22
27
  $ pnpm run prod hello world
23
28
  $ pnpm run dev hello foo -f bar
24
29
  <!-- prettier -->
25
- $ pnpm run dev pr ./tmp/test.svg --verbose
26
- $ pnpm run dev pr ./tmp/test.json --config=auto --ignore=auto
27
- $ pnpm run dev pr ./tmp/test.svg --config=built_in --ignore=auto
30
+ $ pnpm run dev prettier ./tmp/test.svg --verbose
31
+ $ pnpm run dev prettier ./tmp/test.json --config=auto --ignore=auto
32
+ $ pnpm run dev prettier ./tmp/test.svg --config=built_in --ignore=auto
33
+ ```
34
+
35
+ # 安装使用
36
+
37
+ ```sh-session
38
+ $ pnpm install -g meocli
39
+ $ me --version
40
+ $ me prettier ./test.svg --verbose # 使用prettier格式化文件
41
+ $ me hello world
42
+ $ me hello foo -f bar
28
43
  ```
29
44
 
30
45
  # Publish
@@ -35,6 +50,59 @@ $ pnpm build
35
50
  $ pnpm publish
36
51
  ```
37
52
 
53
+ # Vscode
54
+
55
+ 1. `pnpm install -g meocli`
56
+ 2. 配合vscode插件:[emeraldwalk.RunOnSave](https://marketplace.visualstudio.com/items?itemName=emeraldwalk.RunOnSave) 保存时自动格式化
57
+ 3. 配置 `.vscode/settings.json` 添加 `"emeraldwalk.runonsave"` 节点,以下为参考配置⤵︎
58
+
59
+ ```json
60
+ {
61
+ "emeraldwalk.runonsave": {
62
+ "commands": [
63
+ {
64
+ // prettier
65
+ "match": "\\.(ts|js|json|html|css|graphql|gql|yaml|yml|md)$",
66
+ "notMatch": "node_modules/*$",
67
+ "isAsync": true,
68
+ "cmd": "me prettier ${file}"
69
+ },
70
+ {
71
+ // @prettier/plugin-xml
72
+ "match": "\\.(xml|svg)$",
73
+ "isAsync": true,
74
+ "cmd": "me prettier ${file}"
75
+ },
76
+ {
77
+ // prettier-plugin-toml
78
+ "match": "\\.(toml)$",
79
+ "isAsync": true,
80
+ "cmd": "me prettier ${file}"
81
+ },
82
+ {
83
+ // prettier-plugin-nginx
84
+ "match": "\\.(nginx)$",
85
+ "isAsync": true,
86
+ "cmd": "me prettier ${file}"
87
+ },
88
+ {
89
+ // prettier-plugin-sh
90
+ "match": "\\.(sh|env|Dockerfile|properties|gitignore|dockerignore|prettierignore)$",
91
+ "notMatch": "\\.(nu)$",
92
+ "isAsync": true,
93
+ "cmd": "me prettier ${file}"
94
+ },
95
+ {
96
+ // no-dot-ext
97
+ "match": "Dockerfile$",
98
+ "isAsync": true,
99
+ "cmd": "me prettier ${file}"
100
+ }
101
+ ]
102
+ }
103
+ }
104
+ ```
105
+
38
106
  # Usage
39
107
 
40
108
  <!-- usage -->
@@ -43,7 +111,7 @@ $ npm install -g meocli
43
111
  $ me COMMAND
44
112
  running command...
45
113
  $ me (--version)
46
- meocli/0.1.0 win32-x64 node-v24.12.0
114
+ meocli/0.1.1 win32-x64 node-v24.12.0
47
115
  $ me --help [COMMAND]
48
116
  USAGE
49
117
  $ me COMMAND
@@ -67,7 +135,7 @@ USAGE
67
135
  * [`me plugins uninstall [PLUGIN]`](#me-plugins-uninstall-plugin)
68
136
  * [`me plugins unlink [PLUGIN]`](#me-plugins-unlink-plugin)
69
137
  * [`me plugins update`](#me-plugins-update)
70
- * [`me pr FILEPATH`](#me-pr-filepath)
138
+ * [`me prettier FILEPATH`](#me-prettier-filepath)
71
139
 
72
140
  ## `me hello PERSON`
73
141
 
@@ -91,7 +159,7 @@ EXAMPLES
91
159
  hello friend from oclif! (./src/commands/hello/index.ts)
92
160
  ```
93
161
 
94
- _See code: [src/commands/hello/index.ts](https://github.com/meme2046/meocli/blob/v0.1.0/src/commands/hello/index.ts)_
162
+ _See code: [src/commands/hello/index.ts](https://github.com/meme2046/meocli/blob/v0.1.1/src/commands/hello/index.ts)_
95
163
 
96
164
  ## `me hello world`
97
165
 
@@ -109,7 +177,7 @@ EXAMPLES
109
177
  hello world! (./src/commands/hello/world.ts)
110
178
  ```
111
179
 
112
- _See code: [src/commands/hello/world.ts](https://github.com/meme2046/meocli/blob/v0.1.0/src/commands/hello/world.ts)_
180
+ _See code: [src/commands/hello/world.ts](https://github.com/meme2046/meocli/blob/v0.1.1/src/commands/hello/world.ts)_
113
181
 
114
182
  ## `me help [COMMAND]`
115
183
 
@@ -421,13 +489,13 @@ DESCRIPTION
421
489
 
422
490
  _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/update.ts)_
423
491
 
424
- ## `me pr FILEPATH`
492
+ ## `me prettier FILEPATH`
425
493
 
426
494
  Use Prettier to format file
427
495
 
428
496
  ```
429
497
  USAGE
430
- $ me pr FILEPATH [-c <value>] [--ignore <value>] [-v]
498
+ $ me prettier FILEPATH [-c <value>] [--ignore <value>] [-v]
431
499
 
432
500
  ARGUMENTS
433
501
  FILEPATH file path that need to be formatted by Prettier
@@ -443,10 +511,10 @@ DESCRIPTION
443
511
  Use Prettier to format file
444
512
 
445
513
  EXAMPLES
446
- $ me pr ./tests/test.json
514
+ $ me prettier ./tests/test.json
447
515
 
448
- $ me pr ./src/file.ts --config ./.prettierrc.yaml
516
+ $ me prettier ./src/file.ts --config ./.prettierrc.yaml
449
517
  ```
450
518
 
451
- _See code: [src/commands/pr/index.ts](https://github.com/meme2046/meocli/blob/v0.1.0/src/commands/pr/index.ts)_
519
+ _See code: [src/commands/prettier/index.ts](https://github.com/meme2046/meocli/blob/v0.1.1/src/commands/prettier/index.ts)_
452
520
  <!-- commandsstop -->
@@ -117,4 +117,5 @@ export const DEFAULT_IGNORE_PATTERNS = [
117
117
  'coverage/',
118
118
  '.next/',
119
119
  'out/',
120
+ '*.nu',
120
121
  ];
@@ -64,7 +64,7 @@
64
64
  "world.js"
65
65
  ]
66
66
  },
67
- "pr": {
67
+ "prettier": {
68
68
  "aliases": [],
69
69
  "args": {
70
70
  "filePath": {
@@ -108,7 +108,7 @@
108
108
  },
109
109
  "hasDynamicHelp": false,
110
110
  "hiddenAliases": [],
111
- "id": "pr",
111
+ "id": "prettier",
112
112
  "pluginAlias": "meocli",
113
113
  "pluginName": "meocli",
114
114
  "pluginType": "core",
@@ -118,10 +118,10 @@
118
118
  "relativePath": [
119
119
  "dist",
120
120
  "commands",
121
- "pr",
121
+ "prettier",
122
122
  "index.js"
123
123
  ]
124
124
  }
125
125
  },
126
- "version": "0.1.0"
126
+ "version": "0.1.1"
127
127
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "meocli",
3
3
  "description": "A new CLI generated with oclif",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "author": "meme2046",
6
6
  "bin": {
7
7
  "me": "./bin/run.js"
@@ -15,7 +15,8 @@
15
15
  "debug": "^4.4.3",
16
16
  "execa": "^9.6.1",
17
17
  "js-yaml": "^4.1.1",
18
- "prettier": "^3.7.4",
18
+ "npm-check-updates": "^19.3.1",
19
+ "prettier": "^3.8.0",
19
20
  "prettier-plugin-nginx": "^1.0.3",
20
21
  "prettier-plugin-sh": "^0.18.0",
21
22
  "prettier-plugin-toml": "^2.0.6"
@@ -71,9 +72,9 @@
71
72
  "repository": "meme2046/meocli",
72
73
  "types": "dist/index.d.ts",
73
74
  "scripts": {
75
+ "ncu": "ncu --target minor --reject webpack,shx",
74
76
  "dev": "node --no-deprecation --no-warnings --loader ts-node/esm --disable-warning=ExperimentalWarning bin/dev.js",
75
77
  "prod": "node bin/run.js",
76
- "prettier": "prettier",
77
78
  "build": "shx rm -rf dist && tsc -b",
78
79
  "lint": "eslint",
79
80
  "posttest": "pnpm run lint",
File without changes
File without changes