vimd 0.1.0 → 0.1.2
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 +10 -10
- package/dist/cli/index.js +4 -1
- package/package.json +4 -5
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
- **複数テーマ**: 5つの組み込みテーマ (GitHub, Minimal, Dark, Academic, Technical)
|
|
16
16
|
- **pandoc連携**: pandocによる高品質なMarkdown変換
|
|
17
17
|
- **グローバル設定**: プロジェクトディレクトリを汚さない `~/.vimd/config.js`
|
|
18
|
-
-
|
|
18
|
+
- **対話的設定**: `vimd theme` や `vimd config` で簡単に設定変更
|
|
19
19
|
- **クロスプラットフォーム**: macOS, Linux, Windows で動作
|
|
20
20
|
|
|
21
21
|
## インストール
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
npm install -g vimd
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
初回起動時に `vimd theme` で好みのテーマを選択できます。
|
|
28
28
|
|
|
29
29
|
### 必要要件
|
|
30
30
|
|
|
@@ -48,10 +48,10 @@ choco install pandoc
|
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
50
|
# ライブプレビューを開始
|
|
51
|
-
vimd dev
|
|
51
|
+
vimd dev draft.md
|
|
52
52
|
|
|
53
53
|
# 静的HTMLを生成
|
|
54
|
-
vimd build
|
|
54
|
+
vimd build draft.md
|
|
55
55
|
|
|
56
56
|
# テーマを変更
|
|
57
57
|
vimd theme
|
|
@@ -67,9 +67,9 @@ vimd config
|
|
|
67
67
|
ホットリロード対応のライブプレビューサーバーを起動します。ブラウザを自動で開き、ファイルの変更を監視します。
|
|
68
68
|
|
|
69
69
|
```bash
|
|
70
|
-
vimd dev
|
|
70
|
+
vimd dev draft.md
|
|
71
71
|
vimd dev docs/guide.md --port 3000
|
|
72
|
-
vimd dev
|
|
72
|
+
vimd dev article.md --theme dark --no-open
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
**オプション:**
|
|
@@ -83,9 +83,9 @@ vimd dev spec.md --theme dark --no-open
|
|
|
83
83
|
静的HTMLファイルを生成します。スタイルが埋め込まれたスタンドアロンHTMLを出力します。
|
|
84
84
|
|
|
85
85
|
```bash
|
|
86
|
-
vimd build
|
|
86
|
+
vimd build draft.md
|
|
87
87
|
vimd build docs/guide.md -o dist/guide.html
|
|
88
|
-
vimd build
|
|
88
|
+
vimd build article.md --theme academic
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
**オプション:**
|
|
@@ -174,7 +174,7 @@ const converter = new MarkdownConverter({
|
|
|
174
174
|
});
|
|
175
175
|
|
|
176
176
|
// MarkdownをHTMLに変換
|
|
177
|
-
const html = await converter.convertWithTemplate('
|
|
177
|
+
const html = await converter.convertWithTemplate('draft.md');
|
|
178
178
|
|
|
179
179
|
// 利用可能なテーマを一覧表示
|
|
180
180
|
const themes = ThemeManager.list();
|
|
@@ -236,7 +236,7 @@ vimd/
|
|
|
236
236
|
ポート8080が既に使用中の場合:
|
|
237
237
|
|
|
238
238
|
```bash
|
|
239
|
-
vimd dev
|
|
239
|
+
vimd dev draft.md --port 3000
|
|
240
240
|
```
|
|
241
241
|
|
|
242
242
|
または `~/.vimd/config.js` でデフォルトポートを変更してください。
|
package/dist/cli/index.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from 'commander';
|
|
3
|
+
import { createRequire } from 'module';
|
|
3
4
|
import { devCommand } from './commands/dev.js';
|
|
4
5
|
import { buildCommand } from './commands/build.js';
|
|
5
6
|
import { themeCommand } from './commands/theme.js';
|
|
6
7
|
import { configCommand } from './commands/config.js';
|
|
8
|
+
const require = createRequire(import.meta.url);
|
|
9
|
+
const packageJson = require('../../package.json');
|
|
7
10
|
const program = new Command();
|
|
8
11
|
program
|
|
9
12
|
.name('vimd')
|
|
10
13
|
.description('Real-time Markdown preview tool (view markdown)')
|
|
11
|
-
.version(
|
|
14
|
+
.version(packageJson.version);
|
|
12
15
|
// vimd dev <file>
|
|
13
16
|
program
|
|
14
17
|
.command('dev <file>')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vimd",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Real-time Markdown preview tool with pandoc (view markdown)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
|
-
"url": "https://github.com/
|
|
18
|
+
"url": "git+https://github.com/notokeisho/vimd.git"
|
|
19
19
|
},
|
|
20
|
-
"homepage": "https://github.com/
|
|
20
|
+
"homepage": "https://github.com/notokeisho/vimd#readme",
|
|
21
21
|
"bugs": {
|
|
22
|
-
"url": "https://github.com/
|
|
22
|
+
"url": "https://github.com/notokeisho/vimd/issues"
|
|
23
23
|
},
|
|
24
24
|
"bin": {
|
|
25
25
|
"vimd": "./dist/cli/index.js"
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
"lint:fix": "eslint src/**/*.ts --fix",
|
|
43
43
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
44
44
|
"typecheck": "tsc --noEmit",
|
|
45
|
-
"postinstall": "node scripts/postinstall.cjs",
|
|
46
45
|
"prepublishOnly": "npm run build && npm test"
|
|
47
46
|
},
|
|
48
47
|
"engines": {
|