wechat-md-publisher 0.2.4 → 0.2.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/dist/cli.js +0 -0
- package/package.json +11 -13
- package/themes/builtin/orange-heart.css +176 -0
- package/themes/builtin/sports.css +152 -140
package/dist/cli.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wechat-md-publisher",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "全功能微信公众号 Markdown 发布工具 - 支持草稿、发布、删除和多主题",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,16 +15,6 @@
|
|
|
15
15
|
"README.md",
|
|
16
16
|
"LICENSE"
|
|
17
17
|
],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"dev": "vite build --watch",
|
|
20
|
-
"build": "vite build && tsc",
|
|
21
|
-
"test": "vitest",
|
|
22
|
-
"test:unit": "vitest run tests/unit",
|
|
23
|
-
"test:integration": "vitest run tests/integration",
|
|
24
|
-
"lint": "eslint src --ext .ts",
|
|
25
|
-
"format": "prettier --write \"src/**/*.ts\"",
|
|
26
|
-
"prepublishOnly": "pnpm build"
|
|
27
|
-
},
|
|
28
18
|
"keywords": [
|
|
29
19
|
"wechat",
|
|
30
20
|
"weixin",
|
|
@@ -45,7 +35,6 @@
|
|
|
45
35
|
"url": "https://github.com/sipingme/wechat-md-publisher/issues"
|
|
46
36
|
},
|
|
47
37
|
"homepage": "https://github.com/sipingme/wechat-md-publisher#readme",
|
|
48
|
-
"packageManager": "pnpm@10.7.1",
|
|
49
38
|
"dependencies": {
|
|
50
39
|
"@wenyan-md/core": "^2.0.8",
|
|
51
40
|
"commander": "^12.1.0",
|
|
@@ -76,5 +65,14 @@
|
|
|
76
65
|
"jsdom": "^27.4.0",
|
|
77
66
|
"form-data-encoder": "^4.1.0",
|
|
78
67
|
"formdata-node": "^6.0.3"
|
|
68
|
+
},
|
|
69
|
+
"scripts": {
|
|
70
|
+
"dev": "vite build --watch",
|
|
71
|
+
"build": "vite build && tsc",
|
|
72
|
+
"test": "vitest",
|
|
73
|
+
"test:unit": "vitest run tests/unit",
|
|
74
|
+
"test:integration": "vitest run tests/integration",
|
|
75
|
+
"lint": "eslint src --ext .ts",
|
|
76
|
+
"format": "prettier --write \"src/**/*.ts\""
|
|
79
77
|
}
|
|
80
|
-
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Typora Theme - Orange Heart / Author - evgo2017
|
|
3
|
+
* https://github.com/evgo2017/typora-theme-orange-heart
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#wenyan {
|
|
7
|
+
line-height: 1.75;
|
|
8
|
+
font-size: 16px;
|
|
9
|
+
}
|
|
10
|
+
#wenyan p {
|
|
11
|
+
margin: 1em 0;
|
|
12
|
+
}
|
|
13
|
+
#wenyan h1,
|
|
14
|
+
#wenyan h2,
|
|
15
|
+
#wenyan h3,
|
|
16
|
+
#wenyan h4,
|
|
17
|
+
#wenyan h5,
|
|
18
|
+
#wenyan h6 {
|
|
19
|
+
margin: 1.2em 0 1em;
|
|
20
|
+
padding: 0px;
|
|
21
|
+
font-weight: bold;
|
|
22
|
+
}
|
|
23
|
+
#wenyan h1 {
|
|
24
|
+
font-size: 1.5em;
|
|
25
|
+
}
|
|
26
|
+
#wenyan h2 {
|
|
27
|
+
font-size: 1.3em;
|
|
28
|
+
border-bottom: 2px solid rgb(239, 112, 96);
|
|
29
|
+
display: flex;
|
|
30
|
+
}
|
|
31
|
+
#wenyan h2 span {
|
|
32
|
+
display: inline-block;
|
|
33
|
+
font-weight: bold;
|
|
34
|
+
background: rgb(239, 112, 96);
|
|
35
|
+
color: #ffffff;
|
|
36
|
+
padding: 3px 10px 1px;
|
|
37
|
+
border-top-right-radius: 3px;
|
|
38
|
+
border-top-left-radius: 3px;
|
|
39
|
+
margin-right: 3px;
|
|
40
|
+
}
|
|
41
|
+
#wenyan h2::after {
|
|
42
|
+
content: "";
|
|
43
|
+
border-bottom: 36px solid #efebe9;
|
|
44
|
+
border-right: 20px solid transparent;
|
|
45
|
+
align-self: flex-end;
|
|
46
|
+
height: 0;
|
|
47
|
+
}
|
|
48
|
+
#wenyan h3 {
|
|
49
|
+
font-size: 1.3em;
|
|
50
|
+
}
|
|
51
|
+
#wenyan h4 {
|
|
52
|
+
font-size: 1.2em;
|
|
53
|
+
}
|
|
54
|
+
#wenyan h5 {
|
|
55
|
+
font-size: 1.1em;
|
|
56
|
+
}
|
|
57
|
+
#wenyan h6 {
|
|
58
|
+
font-size: 1em;
|
|
59
|
+
}
|
|
60
|
+
#wenyan ul,
|
|
61
|
+
#wenyan ol {
|
|
62
|
+
margin-top: 8px;
|
|
63
|
+
margin-bottom: 8px;
|
|
64
|
+
padding-left: 25px;
|
|
65
|
+
color: black;
|
|
66
|
+
}
|
|
67
|
+
#wenyan ul {
|
|
68
|
+
list-style-type: disc;
|
|
69
|
+
}
|
|
70
|
+
#wenyan ul ul {
|
|
71
|
+
list-style-type: square;
|
|
72
|
+
}
|
|
73
|
+
#wenyan ol {
|
|
74
|
+
list-style-type: decimal;
|
|
75
|
+
}
|
|
76
|
+
#wenyan blockquote {
|
|
77
|
+
margin: 0;
|
|
78
|
+
display: block;
|
|
79
|
+
font-size: 0.9em;
|
|
80
|
+
overflow: auto;
|
|
81
|
+
border-left: 3px solid rgb(239, 112, 96);
|
|
82
|
+
color: #6a737d;
|
|
83
|
+
padding: 10px 10px 10px 20px;
|
|
84
|
+
margin-bottom: 20px;
|
|
85
|
+
margin-top: 20px;
|
|
86
|
+
background: #fff9f9;
|
|
87
|
+
}
|
|
88
|
+
#wenyan a {
|
|
89
|
+
text-decoration: none;
|
|
90
|
+
word-wrap: break-word;
|
|
91
|
+
font-weight: bold;
|
|
92
|
+
color: rgb(239, 112, 96);
|
|
93
|
+
border-bottom: 1px solid rgb(239, 112, 96);
|
|
94
|
+
}
|
|
95
|
+
#wenyan p code,
|
|
96
|
+
#wenyan li code {
|
|
97
|
+
font-size: 0.9em;
|
|
98
|
+
word-wrap: break-word;
|
|
99
|
+
padding: 2px 4px;
|
|
100
|
+
border-radius: 4px;
|
|
101
|
+
margin: 0 2px;
|
|
102
|
+
color: rgb(239, 112, 96);
|
|
103
|
+
background-color: rgba(27, 31, 35, 0.05);
|
|
104
|
+
word-break: break-all;
|
|
105
|
+
}
|
|
106
|
+
#wenyan img {
|
|
107
|
+
max-width: 100%;
|
|
108
|
+
height: auto;
|
|
109
|
+
margin: 0 auto;
|
|
110
|
+
display: block;
|
|
111
|
+
}
|
|
112
|
+
#wenyan span img {
|
|
113
|
+
max-width: 100%;
|
|
114
|
+
display: inline-block;
|
|
115
|
+
border-right: 0px;
|
|
116
|
+
border-left: 0px;
|
|
117
|
+
}
|
|
118
|
+
#wenyan table {
|
|
119
|
+
border-collapse: collapse;
|
|
120
|
+
margin: 1.4em auto;
|
|
121
|
+
max-width: 100%;
|
|
122
|
+
table-layout: fixed;
|
|
123
|
+
text-align: left;
|
|
124
|
+
overflow: auto;
|
|
125
|
+
display: table;
|
|
126
|
+
word-wrap: break-word;
|
|
127
|
+
word-break: break-all;
|
|
128
|
+
}
|
|
129
|
+
#wenyan table td,
|
|
130
|
+
#wenyan table th {
|
|
131
|
+
font-size: 0.75em;
|
|
132
|
+
padding: 9px 12px;
|
|
133
|
+
line-height: 22px;
|
|
134
|
+
border: 1px solid rgb(239, 112, 96);
|
|
135
|
+
vertical-align: top;
|
|
136
|
+
}
|
|
137
|
+
#wenyan table th {
|
|
138
|
+
font-weight: bold;
|
|
139
|
+
background-color: #fff9f9;
|
|
140
|
+
color: rgb(239, 112, 96);
|
|
141
|
+
}
|
|
142
|
+
#wenyan span code,
|
|
143
|
+
#wenyan li code {
|
|
144
|
+
color: rgb(239, 112, 96);
|
|
145
|
+
}
|
|
146
|
+
#wenyan pre {
|
|
147
|
+
border-radius: 5px;
|
|
148
|
+
line-height: 2;
|
|
149
|
+
margin: 1em 0.5em;
|
|
150
|
+
padding: .5em;
|
|
151
|
+
box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px;
|
|
152
|
+
font-size: 12px;
|
|
153
|
+
}
|
|
154
|
+
#wenyan pre code {
|
|
155
|
+
display: block;
|
|
156
|
+
margin: .5em;
|
|
157
|
+
padding: 0;
|
|
158
|
+
}
|
|
159
|
+
#wenyan .footnote {
|
|
160
|
+
color: rgb(239, 112, 96);
|
|
161
|
+
}
|
|
162
|
+
#wenyan #footnotes p {
|
|
163
|
+
display: flex;
|
|
164
|
+
margin: 0;
|
|
165
|
+
font-size: 0.9em;
|
|
166
|
+
}
|
|
167
|
+
#wenyan .footnote-num {
|
|
168
|
+
display: inline;
|
|
169
|
+
width: 10%;
|
|
170
|
+
}
|
|
171
|
+
#wenyan .footnote-txt {
|
|
172
|
+
display: inline;
|
|
173
|
+
width: 90%;
|
|
174
|
+
word-wrap: break-word;
|
|
175
|
+
word-break: break-all;
|
|
176
|
+
}
|
|
@@ -1,164 +1,176 @@
|
|
|
1
|
-
/*
|
|
2
|
-
*
|
|
3
|
-
*
|
|
1
|
+
/*
|
|
2
|
+
* Typora Theme - Orange Heart / Author - evgo2017
|
|
3
|
+
* https://github.com/evgo2017/typora-theme-orange-heart
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
#wenyan {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
line-height: 1.75;
|
|
8
|
+
font-size: 16px;
|
|
9
|
+
}
|
|
10
|
+
#wenyan p {
|
|
11
|
+
margin: 1em 0;
|
|
12
|
+
}
|
|
13
|
+
#wenyan h1,
|
|
14
|
+
#wenyan h2,
|
|
15
|
+
#wenyan h3,
|
|
16
|
+
#wenyan h4,
|
|
17
|
+
#wenyan h5,
|
|
18
|
+
#wenyan h6 {
|
|
19
|
+
margin: 1.2em 0 1em;
|
|
20
|
+
padding: 0px;
|
|
21
|
+
font-weight: bold;
|
|
17
22
|
}
|
|
18
|
-
|
|
19
|
-
/* 一级标题 - 运动胶囊风格 */
|
|
20
23
|
#wenyan h1 {
|
|
21
|
-
|
|
22
|
-
margin: 25px 5px 15px !important;
|
|
23
|
-
color: #ffffff !important;
|
|
24
|
-
font-size: 20px !important;
|
|
25
|
-
font-weight: bold !important;
|
|
26
|
-
text-align: center !important;
|
|
27
|
-
background-color: #00A968 !important;
|
|
28
|
-
background: linear-gradient(90deg, #00A968, #008A56) !important;
|
|
29
|
-
border-radius: 30px !important;
|
|
30
|
-
box-shadow: 0 4px 12px rgba(0, 169, 104, 0.2) !important;
|
|
31
|
-
display: block !important;
|
|
32
|
-
box-sizing: border-box !important;
|
|
24
|
+
font-size: 1.5em;
|
|
33
25
|
}
|
|
34
|
-
|
|
35
|
-
/* 二级标题 - 侧边能量条 */
|
|
36
26
|
#wenyan h2 {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
27
|
+
font-size: 1.3em;
|
|
28
|
+
border-bottom: 2px solid rgb(239, 112, 96);
|
|
29
|
+
display: flex;
|
|
30
|
+
}
|
|
31
|
+
#wenyan h2 span {
|
|
32
|
+
display: inline-block;
|
|
33
|
+
font-weight: bold;
|
|
34
|
+
background: rgb(239, 112, 96);
|
|
35
|
+
color: #ffffff;
|
|
36
|
+
padding: 3px 10px 1px;
|
|
37
|
+
border-top-right-radius: 3px;
|
|
38
|
+
border-top-left-radius: 3px;
|
|
39
|
+
margin-right: 3px;
|
|
40
|
+
}
|
|
41
|
+
#wenyan h2::after {
|
|
42
|
+
content: "";
|
|
43
|
+
border-bottom: 36px solid #efebe9;
|
|
44
|
+
border-right: 20px solid transparent;
|
|
45
|
+
align-self: flex-end;
|
|
46
|
+
height: 0;
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
/* 三级标题 */
|
|
50
48
|
#wenyan h3 {
|
|
51
|
-
|
|
52
|
-
margin: 15px 0 10px !important;
|
|
53
|
-
color: #00A968 !important;
|
|
54
|
-
font-size: 16px !important;
|
|
55
|
-
font-weight: bold !important;
|
|
56
|
-
border-left: 3px solid #00A968 !important;
|
|
57
|
-
display: block !important;
|
|
58
|
-
box-sizing: border-box !important;
|
|
49
|
+
font-size: 1.3em;
|
|
59
50
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
#wenyan p {
|
|
63
|
-
margin: 1em 0 !important;
|
|
64
|
-
text-align: left !important;
|
|
65
|
-
line-height: 1.7 !important;
|
|
66
|
-
color: #2c2c2c !important;
|
|
67
|
-
font-size: 15px !important;
|
|
68
|
-
box-sizing: border-box !important;
|
|
51
|
+
#wenyan h4 {
|
|
52
|
+
font-size: 1.2em;
|
|
69
53
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
#wenyan strong {
|
|
73
|
-
font-weight: bold !important;
|
|
74
|
-
color: #00A968 !important;
|
|
75
|
-
border-bottom: 1px solid rgba(0, 169, 104, 0.3) !important;
|
|
54
|
+
#wenyan h5 {
|
|
55
|
+
font-size: 1.1em;
|
|
76
56
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
#wenyan em {
|
|
80
|
-
color: #555 !important;
|
|
81
|
-
font-style: italic !important;
|
|
57
|
+
#wenyan h6 {
|
|
58
|
+
font-size: 1em;
|
|
82
59
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
padding: 2px 4px !important;
|
|
90
|
-
border-radius: 3px !important;
|
|
91
|
-
font-family: Consolas, Monaco, monospace !important;
|
|
60
|
+
#wenyan ul,
|
|
61
|
+
#wenyan ol {
|
|
62
|
+
margin-top: 8px;
|
|
63
|
+
margin-bottom: 8px;
|
|
64
|
+
padding-left: 25px;
|
|
65
|
+
color: black;
|
|
92
66
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
border-left: 5px solid #00A968 !important;
|
|
102
|
-
margin: 1.5em 0 !important;
|
|
103
|
-
overflow-x: auto !important;
|
|
104
|
-
box-sizing: border-box !important;
|
|
67
|
+
#wenyan ul {
|
|
68
|
+
list-style-type: disc;
|
|
69
|
+
}
|
|
70
|
+
#wenyan ul ul {
|
|
71
|
+
list-style-type: square;
|
|
72
|
+
}
|
|
73
|
+
#wenyan ol {
|
|
74
|
+
list-style-type: decimal;
|
|
105
75
|
}
|
|
106
|
-
|
|
107
|
-
/* 引用块 */
|
|
108
76
|
#wenyan blockquote {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
77
|
+
margin: 0;
|
|
78
|
+
display: block;
|
|
79
|
+
font-size: 0.9em;
|
|
80
|
+
overflow: auto;
|
|
81
|
+
border-left: 3px solid rgb(239, 112, 96);
|
|
82
|
+
color: #6a737d;
|
|
83
|
+
padding: 10px 10px 10px 20px;
|
|
84
|
+
margin-bottom: 20px;
|
|
85
|
+
margin-top: 20px;
|
|
86
|
+
background: #fff9f9;
|
|
115
87
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
88
|
+
#wenyan a {
|
|
89
|
+
text-decoration: none;
|
|
90
|
+
word-wrap: break-word;
|
|
91
|
+
font-weight: bold;
|
|
92
|
+
color: rgb(239, 112, 96);
|
|
93
|
+
border-bottom: 1px solid rgb(239, 112, 96);
|
|
122
94
|
}
|
|
123
|
-
|
|
124
|
-
#wenyan li {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
95
|
+
#wenyan p code,
|
|
96
|
+
#wenyan li code {
|
|
97
|
+
font-size: 0.9em;
|
|
98
|
+
word-wrap: break-word;
|
|
99
|
+
padding: 2px 4px;
|
|
100
|
+
border-radius: 4px;
|
|
101
|
+
margin: 0 2px;
|
|
102
|
+
color: rgb(239, 112, 96);
|
|
103
|
+
background-color: rgba(27, 31, 35, 0.05);
|
|
104
|
+
word-break: break-all;
|
|
105
|
+
}
|
|
106
|
+
#wenyan img {
|
|
107
|
+
max-width: 100%;
|
|
108
|
+
height: auto;
|
|
109
|
+
margin: 0 auto;
|
|
110
|
+
display: block;
|
|
111
|
+
}
|
|
112
|
+
#wenyan span img {
|
|
113
|
+
max-width: 100%;
|
|
114
|
+
display: inline-block;
|
|
115
|
+
border-right: 0px;
|
|
116
|
+
border-left: 0px;
|
|
129
117
|
}
|
|
130
|
-
|
|
131
|
-
/* 表格 - 去掉阴影,强化边框 */
|
|
132
118
|
#wenyan table {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
119
|
+
border-collapse: collapse;
|
|
120
|
+
margin: 1.4em auto;
|
|
121
|
+
max-width: 100%;
|
|
122
|
+
table-layout: fixed;
|
|
123
|
+
text-align: left;
|
|
124
|
+
overflow: auto;
|
|
125
|
+
display: table;
|
|
126
|
+
word-wrap: break-word;
|
|
127
|
+
word-break: break-all;
|
|
140
128
|
}
|
|
141
|
-
|
|
129
|
+
#wenyan table td,
|
|
142
130
|
#wenyan table th {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
131
|
+
font-size: 0.75em;
|
|
132
|
+
padding: 9px 12px;
|
|
133
|
+
line-height: 22px;
|
|
134
|
+
border: 1px solid rgb(239, 112, 96);
|
|
135
|
+
vertical-align: top;
|
|
148
136
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
137
|
+
#wenyan table th {
|
|
138
|
+
font-weight: bold;
|
|
139
|
+
background-color: #fff9f9;
|
|
140
|
+
color: rgb(239, 112, 96);
|
|
141
|
+
}
|
|
142
|
+
#wenyan span code,
|
|
143
|
+
#wenyan li code {
|
|
144
|
+
color: rgb(239, 112, 96);
|
|
145
|
+
}
|
|
146
|
+
#wenyan pre {
|
|
147
|
+
border-radius: 5px;
|
|
148
|
+
line-height: 2;
|
|
149
|
+
margin: 1em 0.5em;
|
|
150
|
+
padding: .5em;
|
|
151
|
+
box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px;
|
|
152
|
+
font-size: 12px;
|
|
153
|
+
}
|
|
154
|
+
#wenyan pre code {
|
|
155
|
+
display: block;
|
|
156
|
+
margin: .5em;
|
|
157
|
+
padding: 0;
|
|
158
|
+
}
|
|
159
|
+
#wenyan .footnote {
|
|
160
|
+
color: rgb(239, 112, 96);
|
|
161
|
+
}
|
|
162
|
+
#wenyan #footnotes p {
|
|
163
|
+
display: flex;
|
|
164
|
+
margin: 0;
|
|
165
|
+
font-size: 0.9em;
|
|
166
|
+
}
|
|
167
|
+
#wenyan .footnote-num {
|
|
168
|
+
display: inline;
|
|
169
|
+
width: 10%;
|
|
170
|
+
}
|
|
171
|
+
#wenyan .footnote-txt {
|
|
172
|
+
display: inline;
|
|
173
|
+
width: 90%;
|
|
174
|
+
word-wrap: break-word;
|
|
175
|
+
word-break: break-all;
|
|
155
176
|
}
|
|
156
|
-
|
|
157
|
-
/* 分割线 */
|
|
158
|
-
#wenyan hr {
|
|
159
|
-
height: 1px !important;
|
|
160
|
-
border: none !important;
|
|
161
|
-
border-top: 1px dashed #00A968 !important;
|
|
162
|
-
margin: 2em 0 !important;
|
|
163
|
-
box-sizing: border-box !important;
|
|
164
|
-
}
|