@lyhue1991/wxgzh 0.2.2 → 0.2.3

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.
@@ -18,7 +18,7 @@ async function convertMarkdownFile(inputPath, outputPath, options) {
18
18
  const raw = await (0, promises_1.readFile)(absoluteInputPath, 'utf8');
19
19
  const parsed = (0, parser_1.parseMarkdown)(raw);
20
20
  const config = await (0, config_1.loadConfig)({ account: options?.account ?? parsed.metadata.account });
21
- const resolvedTheme = options?.theme ?? parsed.metadata.theme ?? config.defaultTheme ?? 'default';
21
+ const resolvedTheme = options?.theme ?? parsed.metadata.theme ?? config.defaultTheme ?? (0, themes_1.getDefaultThemeName)();
22
22
  const html = await (0, converter_1.renderMarkdownToHtml)(parsed.body, {
23
23
  ...parsed.metadata,
24
24
  account: options?.account ?? parsed.metadata.account ?? config.account,
@@ -9,7 +9,7 @@ exports.assertThemeExists = assertThemeExists;
9
9
  exports.getDefaultThemeName = getDefaultThemeName;
10
10
  const node_fs_1 = require("node:fs");
11
11
  const node_path_1 = __importDefault(require("node:path"));
12
- const DEFAULT_THEME = 'default';
12
+ const DEFAULT_THEME = 'black';
13
13
  function getStylesDir() {
14
14
  return node_path_1.default.resolve(__dirname, '../../styles');
15
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyhue1991/wxgzh",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Markdown to WeChat Official Account draft CLI",
5
5
  "license": "MIT",
6
6
  "main": "dist/cli/index.js",
package/styles/black.css CHANGED
@@ -70,17 +70,23 @@ h1 {
70
70
  }
71
71
 
72
72
  h2{
73
- font-size: 25px;
74
- padding: 10px 10px 10px 10px;
75
- line-height: 1.15;
73
+ display: block;
74
+ width: 100%;
75
+ font-size: 18px;
76
+ font-weight: 800;
77
+ padding: 8px 14px;
78
+ line-height: 1.4;
76
79
  margin-top: 1.85em;
77
80
  margin-bottom: 1.15em;
78
- background:#000;
79
- color:#fff;
81
+ margin-left: 0;
82
+ border-bottom: none;
83
+ box-sizing: border-box;
84
+ background: #000;
85
+ color: #fff;
80
86
  }
81
87
 
82
88
  h3 {
83
- font-size: 20px;
89
+ font-size: 16px;
84
90
  line-height: 1.15;
85
91
  margin-top: 2.285714em;
86
92
  margin-bottom: 1.15em;
package/styles/blue.css CHANGED
@@ -71,20 +71,26 @@ h1 {
71
71
  }
72
72
 
73
73
  h2{
74
- font-size: 25px;
75
- padding: 10px 10px 10px 10px; /* 上、右、下、左的内边距分别为10px、20px、15px、25px */
76
- line-height: 1.15;
74
+ display: block;
75
+ width: 100%;
76
+ font-size: 18px;
77
+ font-weight: 800;
78
+ padding: 8px 14px;
79
+ line-height: 1.4;
77
80
  /*24 / 21*/
78
81
  margin-top: 1.85em;
79
82
  /*48 / 21*/
80
83
  margin-bottom: 1.15em;
81
84
  /*24 / 21*/
82
- background:#2891DB;
83
- color:#fff;
85
+ margin-left: 0;
86
+ border-bottom: none;
87
+ box-sizing: border-box;
88
+ background:#2891DB;
89
+ color:#fff;
84
90
  }
85
91
 
86
92
  h3 {
87
- font-size: 20px;
93
+ font-size: 16px;
88
94
  /*21 / 16*/
89
95
  line-height: 1.15;
90
96
  /*24 / 21*/
package/styles/brown.css CHANGED
@@ -70,17 +70,23 @@ h1 {
70
70
  }
71
71
 
72
72
  h2{
73
- font-size: 25px;
74
- padding: 10px 10px 10px 10px;
75
- line-height: 1.15;
73
+ display: block;
74
+ width: 100%;
75
+ font-size: 18px;
76
+ font-weight: 800;
77
+ padding: 8px 14px;
78
+ line-height: 1.4;
76
79
  margin-top: 1.85em;
77
80
  margin-bottom: 1.15em;
78
- background:#D27D2D;
79
- color:#fff;
81
+ margin-left: 0;
82
+ border-bottom: none;
83
+ box-sizing: border-box;
84
+ background:#D27D2D;
85
+ color:#fff;
80
86
  }
81
87
 
82
88
  h3 {
83
- font-size: 20px;
89
+ font-size: 16px;
84
90
  line-height: 1.15;
85
91
  margin-top: 2.285714em;
86
92
  margin-bottom: 1.15em;
@@ -69,17 +69,23 @@ h1 {
69
69
  }
70
70
 
71
71
  h2{
72
- font-size: 25px;
73
- padding: 10px 10px 10px 10px;
74
- line-height: 1.15;
72
+ display: block;
73
+ width: 100%;
74
+ font-size: 18px;
75
+ font-weight: 800;
76
+ padding: 8px 14px;
77
+ line-height: 1.4;
75
78
  margin-top: 1.85em;
76
79
  margin-bottom: 1.15em;
77
- background:#349971;
78
- color:#fff;
80
+ margin-left: 0;
81
+ border-bottom: none;
82
+ box-sizing: border-box;
83
+ background:#349971;
84
+ color:#fff;
79
85
  }
80
86
 
81
87
  h3 {
82
- font-size: 20px;
88
+ font-size: 16px;
83
89
  line-height: 1.15;
84
90
  margin-top: 2.285714em;
85
91
  margin-bottom: 1.15em;
package/styles/green.css CHANGED
@@ -72,20 +72,26 @@ h1 {
72
72
  }
73
73
 
74
74
  h2{
75
- font-size: 25px;
76
- padding: 10px 10px 10px 10px; /* 上、右、下、左的内边距分别为10px、20px、15px、25px */
77
- line-height: 1.15;
75
+ display: block;
76
+ width: 100%;
77
+ font-size: 18px;
78
+ font-weight: 800;
79
+ padding: 8px 14px;
80
+ line-height: 1.4;
78
81
  /*24 / 21*/
79
82
  margin-top: 1.85em;
80
83
  /*48 / 21*/
81
84
  margin-bottom: 1.15em;
82
85
  /*24 / 21*/
83
- background:#7FFF06;
84
- color:#fff;
86
+ margin-left: 0;
87
+ border-bottom: none;
88
+ box-sizing: border-box;
89
+ background:#7FFF06;
90
+ color:#fff;
85
91
  }
86
92
 
87
93
  h3 {
88
- font-size: 20px;
94
+ font-size: 16px;
89
95
  /*21 / 16*/
90
96
  line-height: 1.15;
91
97
  /*24 / 21*/
package/styles/orange.css CHANGED
@@ -72,20 +72,26 @@ h1 {
72
72
  }
73
73
 
74
74
  h2{
75
- font-size: 25px;
76
- padding: 10px 10px 10px 10px; /* 上、右、下、左的内边距分别为10px、20px、15px、25px */
77
- line-height: 1.15;
75
+ display: block;
76
+ width: 100%;
77
+ font-size: 18px;
78
+ font-weight: 800;
79
+ padding: 8px 14px;
80
+ line-height: 1.4;
78
81
  /*24 / 21*/
79
82
  margin-top: 1.85em;
80
83
  /*48 / 21*/
81
84
  margin-bottom: 1.15em;
82
85
  /*24 / 21*/
83
- background:#F7BC0A;
84
- color:#fff;
86
+ margin-left: 0;
87
+ border-bottom: none;
88
+ box-sizing: border-box;
89
+ background:#F7BC0A;
90
+ color:#fff;
85
91
  }
86
92
 
87
93
  h3 {
88
- font-size: 20px;
94
+ font-size: 16px;
89
95
  /*21 / 16*/
90
96
  line-height: 1.15;
91
97
  /*24 / 21*/
package/styles/red.css CHANGED
@@ -72,20 +72,26 @@ h1 {
72
72
  }
73
73
 
74
74
  h2{
75
- font-size: 25px;
76
- padding: 10px 10px 10px 10px; /* 上、右、下、左的内边距分别为10px、20px、15px、25px */
77
- line-height: 1.15;
75
+ display: block;
76
+ width: 100%;
77
+ font-size: 18px;
78
+ font-weight: 800;
79
+ padding: 8px 14px;
80
+ line-height: 1.4;
78
81
  /*24 / 21*/
79
82
  margin-top: 1.85em;
80
83
  /*48 / 21*/
81
84
  margin-bottom: 1.15em;
82
85
  /*24 / 21*/
83
- background:#DC143C;
84
- color:#fff;
86
+ margin-left: 0;
87
+ border-bottom: none;
88
+ box-sizing: border-box;
89
+ background:#DC143C;
90
+ color:#fff;
85
91
  }
86
92
 
87
93
  h3 {
88
- font-size: 20px;
94
+ font-size: 16px;
89
95
  /*21 / 16*/
90
96
  line-height: 1.15;
91
97
  /*24 / 21*/
package/styles/yellow.css CHANGED
@@ -72,20 +72,26 @@ h1 {
72
72
  }
73
73
 
74
74
  h2{
75
- font-size: 25px;
76
- padding: 10px 10px 10px 10px; /* 上、右、下、左的内边距分别为10px、20px、15px、25px */
77
- line-height: 1.15;
75
+ display: block;
76
+ width: 100%;
77
+ font-size: 18px;
78
+ font-weight: 800;
79
+ padding: 8px 14px;
80
+ line-height: 1.4;
78
81
  /*24 / 21*/
79
82
  margin-top: 1.85em;
80
83
  /*48 / 21*/
81
84
  margin-bottom: 1.15em;
82
85
  /*24 / 21*/
83
- background:#FFD139;
84
- color:#fff;
86
+ margin-left: 0;
87
+ border-bottom: none;
88
+ box-sizing: border-box;
89
+ background:#FFD139;
90
+ color:#fff;
85
91
  }
86
92
 
87
93
  h3 {
88
- font-size: 20px;
94
+ font-size: 16px;
89
95
  /*21 / 16*/
90
96
  line-height: 1.15;
91
97
  /*24 / 21*/