md-preview-cli-plus 1.0.2 → 1.0.4
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/.github/workflows/main.yml +31 -0
- package/README.md +7 -1
- package/bin/cli.js +1 -1
- package/package.json +4 -2
@@ -0,0 +1,31 @@
|
|
1
|
+
name: Publish to npm
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- 'v*' # 仅当发布 tag,如 v1.0.0 时触发
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
publish:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
|
12
|
+
steps:
|
13
|
+
- name: Checkout repo
|
14
|
+
uses: actions/checkout@v3
|
15
|
+
|
16
|
+
- name: Setup Node.js
|
17
|
+
uses: actions/setup-node@v3
|
18
|
+
with:
|
19
|
+
node-version: 18
|
20
|
+
registry-url: 'https://registry.npmjs.org/'
|
21
|
+
|
22
|
+
- name: Install dependencies
|
23
|
+
run: npm ci
|
24
|
+
|
25
|
+
- name: Run
|
26
|
+
run: npm run # 如果你没有 build 步骤可以删掉
|
27
|
+
|
28
|
+
- name: Publish to npm
|
29
|
+
run: npm publish
|
30
|
+
env:
|
31
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/README.md
CHANGED
@@ -13,8 +13,14 @@ CLI + Web + Markdown 三位一体
|
|
13
13
|
# Getting Started
|
14
14
|
|
15
15
|
```bash
|
16
|
+
#for repeated use
|
17
|
+
npm i md-preview-cli-plus
|
16
18
|
npx md-preview --help #help
|
17
|
-
npx md-preview README.md --port
|
19
|
+
npx md-preview README.md --port 5533 --theme dark --export ./666.html #example
|
20
|
+
|
21
|
+
#run it once
|
22
|
+
npx md-preview-cli-plus --help
|
23
|
+
npx md-preview-cli-plus <file_path> [options]
|
18
24
|
```
|
19
25
|
|
20
26
|
# Features
|
package/bin/cli.js
CHANGED
@@ -19,7 +19,7 @@ program.name('md-preview').description('Markdown real-time preview CLI').version
|
|
19
19
|
|
20
20
|
program
|
21
21
|
.argument('<file>', `${file_d}`)
|
22
|
-
.option('--port <port>', `${port_d}`,
|
22
|
+
.option('--port <port>', `${port_d}`, 7777)
|
23
23
|
.option('--theme <theme>', `${theme_d}`, 'default')
|
24
24
|
.option('--export <path>', `${export_d}`, null)
|
25
25
|
//修改CLI支持--plugin参数 可多个
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "md-preview-cli-plus",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.4",
|
4
4
|
"description": "md real-time preview + export",
|
5
5
|
"keywords": [
|
6
6
|
"markdown",
|
@@ -29,7 +29,9 @@
|
|
29
29
|
"prepare": "husky"
|
30
30
|
},
|
31
31
|
"lint-staged": {
|
32
|
-
"*.js": [
|
32
|
+
"*.js": [
|
33
|
+
"prettier --write"
|
34
|
+
]
|
33
35
|
},
|
34
36
|
"dependencies": {
|
35
37
|
"chalk": "^4.1.2",
|