vimd 0.5.8 → 0.5.10

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
@@ -84,7 +84,8 @@ choco install pandoc # Windows
84
84
 
85
85
  ```bash
86
86
  # ライブプレビューを開始(pandoc不要、高速)
87
- vimd dev draft.md
87
+ vimd draft.md # 省略形式(v0.5.10以降)
88
+ vimd dev draft.md # 従来の形式も使用可能
88
89
 
89
90
  # 静的HTMLを生成(pandoc使用、高品質)
90
91
  vimd build draft.md
@@ -117,6 +118,8 @@ npm install -g vimd
117
118
 
118
119
  | コマンド | 説明 |
119
120
  | ------------------- | ------------------------------ |
121
+ | `vimd <file>` | ライブプレビューサーバーを起動(`dev`省略形) |
122
+ | `vimd <folder>` | フォルダモードを起動(`dev`省略形) |
120
123
  | `vimd dev <file>` | ライブプレビューサーバーを起動 |
121
124
  | `vimd dev <folder>` | フォルダモードを起動 |
122
125
  | `vimd build <file>` | 静的HTMLを生成 |
@@ -236,13 +239,15 @@ vimd はフォルダ内の複数ファイルを同一ポートで切り替えな
236
239
 
237
240
  ```bash
238
241
  # カレントディレクトリをプレビュー
239
- vimd dev .
242
+ vimd . # 省略形式(v0.5.10以降)
243
+ vimd dev . # 従来の形式も使用可能
240
244
 
241
245
  # 指定フォルダをプレビュー
242
- vimd dev ./docs
246
+ vimd ./docs # 省略形式
247
+ vimd dev ./docs # 従来の形式
243
248
  ```
244
249
 
245
- VSCode風のサイドバーでファイルを選択し、リアルタイムでプレビューを確認できます。
250
+ サイドバーでファイルを選択し、リアルタイムでプレビューを確認できます。
246
251
 
247
252
  **対応する拡張子**:
248
253
  - `.md` (Markdown)
package/dist/cli/index.js CHANGED
@@ -55,4 +55,13 @@ program
55
55
  .description('Reset configuration to defaults')
56
56
  .option('-y, --yes', 'Skip confirmation prompt')
57
57
  .action(resetCommand);
58
+ // Allow omitting 'dev' subcommand: vimd README.md -> vimd dev README.md
59
+ const subcommands = ['dev', 'build', 'theme', 'config', 'kill', 'reset', 'help'];
60
+ const globalFlags = ['--help', '-h', '--version', '-V'];
61
+ const args = process.argv.slice(2);
62
+ const firstArg = args[0];
63
+ // Insert 'dev' if first argument is not a subcommand or global flag
64
+ if (firstArg && !subcommands.includes(firstArg) && !globalFlags.includes(firstArg)) {
65
+ process.argv.splice(2, 0, 'dev');
66
+ }
58
67
  program.parse(process.argv);
@@ -14,14 +14,20 @@
14
14
  box-sizing: border-box;
15
15
  }
16
16
 
17
- html, body {
17
+ html {
18
18
  margin: 0;
19
19
  padding: 0;
20
20
  width: 100%;
21
21
  height: 100%;
22
22
  }
23
23
 
24
+ /* Reset theme's body constraints for full-width container */
24
25
  body {
26
+ margin: 0 !important;
27
+ padding: 0 !important;
28
+ max-width: none !important;
29
+ width: 100% !important;
30
+ height: 100%;
25
31
  overflow: hidden;
26
32
  }
27
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vimd",
3
- "version": "0.5.8",
3
+ "version": "0.5.10",
4
4
  "description": "Real-time Markdown preview tool with pandoc (view markdown)",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -14,14 +14,20 @@
14
14
  box-sizing: border-box;
15
15
  }
16
16
 
17
- html, body {
17
+ html {
18
18
  margin: 0;
19
19
  padding: 0;
20
20
  width: 100%;
21
21
  height: 100%;
22
22
  }
23
23
 
24
+ /* Reset theme's body constraints for full-width container */
24
25
  body {
26
+ margin: 0 !important;
27
+ padding: 0 !important;
28
+ max-width: none !important;
29
+ width: 100% !important;
30
+ height: 100%;
25
31
  overflow: hidden;
26
32
  }
27
33