juice-email-cli 2.4.6 → 2.4.8
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/edm/elabscience/series/activity/_meta.yaml +2 -0
- package/edm/elabscience/series/activity/default/_meta.yaml +2 -0
- package/edm/elabscience/series/activity/default/juice.yaml +64 -0
- package/edm/elabscience/series/activity/default/snippet.html +137 -0
- package/edm/procell/series/activity/_meta.yaml +2 -0
- package/edm/procell/series/activity/default/_meta.yaml +2 -0
- package/edm/procell/series/activity/default/juice.yaml +66 -0
- package/edm/procell/series/activity/default/snippet.html +123 -0
- package/package.json +2 -2
- package/src/index.js +80 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# juice.yaml - 用户配置文件示例
|
|
2
|
+
#
|
|
3
|
+
# 放置位置(优先级从低到高):
|
|
4
|
+
# ~/juice.yaml ← 用户主目录,对所有项目生效
|
|
5
|
+
# <模板文件目录>/juice.yaml ← 仅对当前项目生效(推荐)
|
|
6
|
+
# juice -c <此文件> ← 命令行指定
|
|
7
|
+
#
|
|
8
|
+
# 所有配置项均与 CLI 内置默认值深度合并,未填写的字段自动使用内置值。
|
|
9
|
+
# 完整默认配置见:<CLI安装目录>/defaults/juice.yaml
|
|
10
|
+
|
|
11
|
+
# ─── 模板变量(Mustache 语法)────────────────────────────────────────────────
|
|
12
|
+
variables:
|
|
13
|
+
banner:
|
|
14
|
+
pc: https://files.elabscience.cn/assets/images/article/202604221646/pc.webp
|
|
15
|
+
mobile: https://files.elabscience.cn/assets/images/article/202604221646/mobile.webp
|
|
16
|
+
|
|
17
|
+
activity:
|
|
18
|
+
comment: 以上4个活动可同享,单个产线内活动可叠享,此活动不与其他优惠活动叠享
|
|
19
|
+
lists:
|
|
20
|
+
- title: 活动1:代谢检测试剂盒 立减150元
|
|
21
|
+
content:
|
|
22
|
+
- 购买列表磁珠分选试剂盒产品,享双重惊喜:
|
|
23
|
+
- ①. 磁珠分选试剂盒65折特惠
|
|
24
|
+
- 购买列表磁珠分选试剂盒享65折特惠
|
|
25
|
+
- ②. 磁力架超值买购优惠
|
|
26
|
+
condition:
|
|
27
|
+
- 购买≥100 Assays磁珠分选试剂盒:加价800元换购磁力架1个
|
|
28
|
+
- 累计购买≥200 Assays磁珠分选试剂盒:加价500元换购磁力架1个
|
|
29
|
+
note:
|
|
30
|
+
- 注1:除BCA蛋白浓度测定试剂盒(货号:E-BC-K318-M)外,全线可参与;免价格最低款
|
|
31
|
+
- 注2:除BCA蛋白浓度测定试剂盒(货号:E-BC-K318-M)外,全线可参与;免价格最低款
|
|
32
|
+
link: "#test1"
|
|
33
|
+
buttonText: 点击查看流式抗体及流式辅助试剂活动产品列表
|
|
34
|
+
|
|
35
|
+
- title: 活动2:代谢检测试剂盒 立减150元
|
|
36
|
+
condition:
|
|
37
|
+
- 购买≥100 Assays磁珠分选试剂盒:加价800元换购磁力架1个
|
|
38
|
+
- 累计购买≥200 Assays磁珠分选试剂盒:加价500元换购磁力架1个
|
|
39
|
+
note:
|
|
40
|
+
- 注1:除BCA蛋白浓度测定试剂盒(货号:E-BC-K318-M)外,全线可参与;免价格最低款
|
|
41
|
+
- 注2:除BCA蛋白浓度测定试剂盒(货号:E-BC-K318-M)外,全线可参与;免价格最低款
|
|
42
|
+
link: "#test2"
|
|
43
|
+
buttonText: 点击查看流式抗体及流式辅助试剂活动产品列表
|
|
44
|
+
|
|
45
|
+
- title: 活动3:代谢检测试剂盒 立减150元
|
|
46
|
+
condition:
|
|
47
|
+
- 购买≥100 Assays磁珠分选试剂盒:加价800元换购磁力架1个
|
|
48
|
+
- 累计购买≥200 Assays磁珠分选试剂盒:加价500元换购磁力架1个
|
|
49
|
+
link: "#test3"
|
|
50
|
+
# buttonText: 点击查看流式抗体及流式辅助试剂活动产品列表
|
|
51
|
+
|
|
52
|
+
needSearch: true
|
|
53
|
+
|
|
54
|
+
# ── 产品列表 ────────────────────────────────────────────────────────────────
|
|
55
|
+
# 使用 {{#productLists}}...{{/productLists}} 循环遍历
|
|
56
|
+
# {{#productLists}}{{name}}{{catNo}}{{/productLists}}
|
|
57
|
+
productLists:
|
|
58
|
+
- name: Human NOS2/iNOS(Nitric Oxide Synthase 2, Inducible) ELISA Kit
|
|
59
|
+
catNo: E-EL-H0753
|
|
60
|
+
link: https://www.elabscience.com/p/human-nos2-inos-nitric-oxide-synthase-2-inducible-elisa-kit--e-el-h0753
|
|
61
|
+
|
|
62
|
+
- name: Mouse NOS2/iNOS(Nitric Oxide Synthase 2, Inducible) ELISA Kit
|
|
63
|
+
catNo: E-EL-M0696
|
|
64
|
+
link: https://www.elabscience.com/p/mouse-nos2-inos-nitric-oxide-synthase-2-inducible-elisa-kit--e-el-m0696
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{{#banner}}
|
|
2
|
+
<div class="d-flex align-item-center justify-content-center mb-2">
|
|
3
|
+
<img class="{{#mobile}}d-none d-md-block{{/mobile}}{{^mobile}}d-block{{/mobile}} img-fluid m-auto border-0" src="{{pc}}" />
|
|
4
|
+
|
|
5
|
+
{{#mobile}}
|
|
6
|
+
<img class="d-block d-md-none img-fluid m-auto border-0" src="{{mobile}}" />
|
|
7
|
+
{{/mobile}}
|
|
8
|
+
</div>
|
|
9
|
+
{{/banner}}
|
|
10
|
+
|
|
11
|
+
{{#activity}}
|
|
12
|
+
<div class="row no-gutters" style="background-color: #f9fafb;">
|
|
13
|
+
{{#lists}}
|
|
14
|
+
<div class="col-12 col-md-6" style="padding: 10px 15px;">
|
|
15
|
+
<div style="background-color: #ffffff; border: 1px solid #ececec; padding: 10px 10px 42px; {{^buttonText}}padding-bottom: 10px;{{/buttonText}} position: relative; height: 100%; font-size: 16px;">
|
|
16
|
+
<div style="color: #0c7dcc; margin-bottom: 10px;">
|
|
17
|
+
<img src="https://files.elabscience.cn/assets/images/hoticon.png" style="width: 20px; margin-top: -6px;" />
|
|
18
|
+
<strong style="font-weight: bolder;">{{title}}</strong>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
{{#content}}
|
|
22
|
+
<div>{{.}}</div>
|
|
23
|
+
{{/content}}
|
|
24
|
+
|
|
25
|
+
{{#condition}}
|
|
26
|
+
<div class="d-flex align-items-center">
|
|
27
|
+
<strong style="margin-top: -6px; margin-right: 5px; font-weight: bolder; font-family: 微软雅黑;">·</strong>
|
|
28
|
+
<span>{{.}}</span>
|
|
29
|
+
</div>
|
|
30
|
+
{{/condition}}
|
|
31
|
+
|
|
32
|
+
{{#note}}
|
|
33
|
+
<div style="font-size: 14px;">{{.}}</div>
|
|
34
|
+
{{/note}}
|
|
35
|
+
|
|
36
|
+
{{#buttonText}}
|
|
37
|
+
<a {{#link}}href="{{link}}"{{/link}} style="text-decoration: none; background-color: #0c7dcc; color: #ffffff; padding: 3px 8px; border-radius: 4px; position: absolute; bottom: 10px; left: 10px; cursor: pointer; font-size: 12px;">{{buttonText}}</a>
|
|
38
|
+
{{/buttonText}}
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
{{/lists}}
|
|
42
|
+
|
|
43
|
+
{{#comment}}
|
|
44
|
+
<div class="col-12" style="padding: 10px 15px;">
|
|
45
|
+
<div style="background: #ffffff; border: 1px solid #ececec; padding: 10px; font-size: 16px;">
|
|
46
|
+
<span style="color: #ff0000;">*</span>{{comment}}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
{{/comment}}
|
|
50
|
+
</div>
|
|
51
|
+
{{/activity}}
|
|
52
|
+
|
|
53
|
+
{{#needSearch}}
|
|
54
|
+
<div class="search-box-wrapper mt-3 mb-4">
|
|
55
|
+
<form onsubmit="return false;" id="search_form_detail" action="" method="get" accept-charset="utf-8" class="position-relative needs-validation w-100 rounded search-form" novalidate="">
|
|
56
|
+
<div class="col-12 col-md-6 pl-0 pr-0 pr-md-3">
|
|
57
|
+
<div class="d-flex">
|
|
58
|
+
<div class="position-relative flex-grow-1 form-group mb-0 rol">
|
|
59
|
+
<div class="search-clear" >
|
|
60
|
+
<i class="fa-solid fa-close"></i>
|
|
61
|
+
</div>
|
|
62
|
+
<input id="keywords_detail" autocomplete="off" class="fs_14 w-100 h-100 border text-truncate search-text rounded-0" type="text" name="keywords" placeholder="请输入货号/产品名/靶点" required="" style="padding: 10px 12px;" />
|
|
63
|
+
<div id="keywordstips-detail" class="keywordstips-detail tip keywords-error invalid-feedback position-absolute" style="bottom: -20px;">请输入货号/产品名/靶点 !</div>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div class="search_btn_parent">
|
|
67
|
+
<input id="search_btn_detail" class="search_btn-detail btn btn-primary border-0 rounded-0 position-relative w-100" type="button" value="" style="height: 38px;" />
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</form>
|
|
72
|
+
|
|
73
|
+
<div id="search-result-list-empty" class="search-result-list-empty mt-4" style="display: none;">
|
|
74
|
+
<div style="background-color: #f8f8f8;" class="px-3">
|
|
75
|
+
<div class="py-3 fs_20">
|
|
76
|
+
<i class="iconfont icon-dianji pr-1 fs_18 text-primary"></i>很抱歉,没有找到“<span id="searchedKeywords" class="text-danger"></span>”的相关产品。
|
|
77
|
+
</div>
|
|
78
|
+
<div class="row mx-0">
|
|
79
|
+
<div class="col-lg-8 p-0">
|
|
80
|
+
<h5 class="fs_16">搜索建议</h5>
|
|
81
|
+
<p> > 确保所有单词拼写正确 </p>
|
|
82
|
+
<p> > 尝试不同关键字 </p>
|
|
83
|
+
<p> > <a class="pl-0 text-primary" href="/about_us-contact_us">联系我们</a>,我们会帮您找到您需要的产品。</p>
|
|
84
|
+
</div>
|
|
85
|
+
<div class="col-lg-4 p-0 text-right">
|
|
86
|
+
<img class="img-fluid lazy_load d-inline-block" src="//files.elabscience.cn/assets/images/loading.png" data-src="//files.elabscience.cn/assets/images/search-empty-new.png" style="aspect-ratio:264/138"/>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div id="search-result-list-detail" class="search-result-list-detail mt-4" style="display: none;">
|
|
93
|
+
<div data-v-c8b454df="" draggable="false">
|
|
94
|
+
<div style="background: #f9fafb; margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; font-size: 16px;">
|
|
95
|
+
<div style="text-align: center;">
|
|
96
|
+
<div style="width: 100%; overflow-x: auto;">
|
|
97
|
+
<table
|
|
98
|
+
style="box-sizing:border-box;border-collapse:collapse;width: 100%;text-align: center;"
|
|
99
|
+
border="1" cellpadding="4" width="100%">
|
|
100
|
+
<thead>
|
|
101
|
+
<tr style="background: #0C7DCC;">
|
|
102
|
+
<th
|
|
103
|
+
style="border-style:none none solid none;box-sizing:border-box;background-clip:initial;background-origin:initial;background-attachment:initial;background-repeat-y:initial;background-repeat-x:initial;background-size:initial;background-position-y:initial;background-position-x:initial;background-image:initial;position:sticky;font-size:14.4px;z-index:10;top:0px;border-bottom-color:#cacaca;border-bottom-width:1px;background-color:#0c7dcc;text-align:inherit;min-width: 168px;color: #fff;background: #0C7DCC;">
|
|
104
|
+
货号</th>
|
|
105
|
+
<th
|
|
106
|
+
style="border-style:none none solid none;box-sizing:border-box;background-clip:initial;background-origin:initial;background-attachment:initial;background-repeat-y:initial;background-repeat-x:initial;background-size:initial;background-position-y:initial;background-position-x:initial;background-image:initial;position:sticky;font-size:14.4px;z-index:10;top:0px;border-bottom-color:#cacaca;border-bottom-width:1px;background-color:#0c7dcc;text-align:inherit;min-width: 120px;color: #fff;background: #0C7DCC;">
|
|
107
|
+
名称</th>
|
|
108
|
+
<th
|
|
109
|
+
style="border-style:none none solid none;box-sizing:border-box;background-clip:initial;background-origin:initial;background-attachment:initial;background-repeat-y:initial;background-repeat-x:initial;background-size:initial;background-position-y:initial;background-position-x:initial;background-image:initial;position:sticky;font-size:14.4px;z-index:10;top:0px;border-bottom-color:#cacaca;border-bottom-width:1px;background-color:#0c7dcc;text-align:inherit;min-width: 188px;color: #fff;background: #0C7DCC;">
|
|
110
|
+
规格</th>
|
|
111
|
+
<!-- <th
|
|
112
|
+
style="border-style:none none solid none;box-sizing:border-box;background-clip:initial;background-origin:initial;background-attachment:initial;background-repeat-y:initial;background-repeat-x:initial;background-size:initial;background-position-y:initial;background-position-x:initial;background-image:initial;position:sticky;font-size:14.4px;z-index:10;top:0px;border-bottom-color:#cacaca;border-bottom-width:1px;background-color:#0c7dcc;text-align:inherit;min-width: 188px;color: #fff;background: #0C7DCC;">
|
|
113
|
+
官网价/元</th> -->
|
|
114
|
+
</tr>
|
|
115
|
+
</thead>
|
|
116
|
+
<tbody id="search-result-list-detail-tbody" class="use-table" style="text-align: center;">
|
|
117
|
+
<!-- <tr>
|
|
118
|
+
<td><a
|
|
119
|
+
href="/p-easysort-mouse-cd3-t-cell-isolation-kit-mim001n-78966"
|
|
120
|
+
style="text-decoration:none;box-sizing:border-box;background-color:transparent;color:#0c7dcc;">MIM001N</a>
|
|
121
|
+
|
|
122
|
+
</td>
|
|
123
|
+
<td>EasySort™ Mouse CD3+T Cell Isolation Kit</td>
|
|
124
|
+
<td>10/100/200 Assays</td>
|
|
125
|
+
<td>780/3860/5860</td>
|
|
126
|
+
</tr> -->
|
|
127
|
+
</tbody>
|
|
128
|
+
</table>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
{{/needSearch}}
|
|
136
|
+
|
|
137
|
+
<div id="searchedHidden">searchedHidden</div>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# juice.yaml - 用户配置文件示例
|
|
2
|
+
#
|
|
3
|
+
# 放置位置(优先级从低到高):
|
|
4
|
+
# ~/juice.yaml ← 用户主目录,对所有项目生效
|
|
5
|
+
# <模板文件目录>/juice.yaml ← 仅对当前项目生效(推荐)
|
|
6
|
+
# juice -c <此文件> ← 命令行指定
|
|
7
|
+
#
|
|
8
|
+
# 所有配置项均与 CLI 内置默认值深度合并,未填写的字段自动使用内置值。
|
|
9
|
+
# 完整默认配置见:<CLI安装目录>/defaults/juice.yaml
|
|
10
|
+
|
|
11
|
+
# ─── 模板变量(Mustache 语法)────────────────────────────────────────────────
|
|
12
|
+
variables:
|
|
13
|
+
banner:
|
|
14
|
+
pc: https://files.procell.com.cn/article-imgs/1920x420 0528N.webp
|
|
15
|
+
mobile: https://files.procell.com.cn/article-imgs/750x376.webp
|
|
16
|
+
|
|
17
|
+
datetime: 2026.6.11-2026.7.24
|
|
18
|
+
|
|
19
|
+
activity:
|
|
20
|
+
comment: 以上4个活动可同享,单个产线内活动可叠享,此活动不与其他优惠活动叠享
|
|
21
|
+
lists:
|
|
22
|
+
- title: 活动1:代谢检测试剂盒 立减150元
|
|
23
|
+
content:
|
|
24
|
+
- 购买列表磁珠分选试剂盒产品,享双重惊喜:
|
|
25
|
+
- ①. 磁珠分选试剂盒65折特惠
|
|
26
|
+
- 购买列表磁珠分选试剂盒享65折特惠
|
|
27
|
+
- ②. 磁力架超值买购优惠
|
|
28
|
+
condition:
|
|
29
|
+
- 购买≥100 Assays磁珠分选试剂盒:加价800元换购磁力架1个
|
|
30
|
+
- 累计购买≥200 Assays磁珠分选试剂盒:加价500元换购磁力架1个
|
|
31
|
+
note:
|
|
32
|
+
- 注1:除BCA蛋白浓度测定试剂盒(货号:E-BC-K318-M)外,全线可参与;免价格最低款
|
|
33
|
+
- 注2:除BCA蛋白浓度测定试剂盒(货号:E-BC-K318-M)外,全线可参与;免价格最低款
|
|
34
|
+
link: "#test1"
|
|
35
|
+
buttonText: 点击查看流式抗体及流式辅助试剂活动产品列表
|
|
36
|
+
|
|
37
|
+
- title: 活动2:代谢检测试剂盒 立减150元
|
|
38
|
+
condition:
|
|
39
|
+
- 购买≥100 Assays磁珠分选试剂盒:加价800元换购磁力架1个
|
|
40
|
+
- 累计购买≥200 Assays磁珠分选试剂盒:加价500元换购磁力架1个
|
|
41
|
+
note:
|
|
42
|
+
- 注1:除BCA蛋白浓度测定试剂盒(货号:E-BC-K318-M)外,全线可参与;免价格最低款
|
|
43
|
+
- 注2:除BCA蛋白浓度测定试剂盒(货号:E-BC-K318-M)外,全线可参与;免价格最低款
|
|
44
|
+
link: "#test2"
|
|
45
|
+
buttonText: 点击查看流式抗体及流式辅助试剂活动产品列表
|
|
46
|
+
|
|
47
|
+
- title: 活动3:代谢检测试剂盒 立减150元
|
|
48
|
+
condition:
|
|
49
|
+
- 购买≥100 Assays磁珠分选试剂盒:加价800元换购磁力架1个
|
|
50
|
+
- 累计购买≥200 Assays磁珠分选试剂盒:加价500元换购磁力架1个
|
|
51
|
+
link: "#test3"
|
|
52
|
+
# buttonText: 点击查看流式抗体及流式辅助试剂活动产品列表
|
|
53
|
+
|
|
54
|
+
needSearch: true
|
|
55
|
+
|
|
56
|
+
# ── 产品列表 ────────────────────────────────────────────────────────────────
|
|
57
|
+
# 使用 {{#productLists}}...{{/productLists}} 循环遍历
|
|
58
|
+
# {{#productLists}}{{name}}{{catNo}}{{/productLists}}
|
|
59
|
+
productLists:
|
|
60
|
+
- name: Human NOS2/iNOS(Nitric Oxide Synthase 2, Inducible) ELISA Kit
|
|
61
|
+
catNo: E-EL-H0753
|
|
62
|
+
link: https://www.elabscience.com/p/human-nos2-inos-nitric-oxide-synthase-2-inducible-elisa-kit--e-el-h0753
|
|
63
|
+
|
|
64
|
+
- name: Mouse NOS2/iNOS(Nitric Oxide Synthase 2, Inducible) ELISA Kit
|
|
65
|
+
catNo: E-EL-M0696
|
|
66
|
+
link: https://www.elabscience.com/p/mouse-nos2-inos-nitric-oxide-synthase-2-inducible-elisa-kit--e-el-m0696
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{{#banner}}
|
|
2
|
+
<div class="d-flex align-item-center justify-content-center mb-3">
|
|
3
|
+
<img class="{{#mobile}}d-none d-md-block{{/mobile}}{{^mobile}}d-block{{/mobile}} img-fluid m-auto border-0" src="{{pc}}" />
|
|
4
|
+
|
|
5
|
+
{{#mobile}}
|
|
6
|
+
<img class="d-block d-md-none img-fluid m-auto border-0" src="{{mobile}}" />
|
|
7
|
+
{{/mobile}}
|
|
8
|
+
</div>
|
|
9
|
+
{{/banner}}
|
|
10
|
+
|
|
11
|
+
{{#datetime}}
|
|
12
|
+
<p><strong>活动时间:{{datetime}}</strong></p>
|
|
13
|
+
{{/datetime}}
|
|
14
|
+
|
|
15
|
+
{{#activity}}
|
|
16
|
+
<div class="row no-gutters" style="background-color: #f9fafb;">
|
|
17
|
+
{{#lists}}
|
|
18
|
+
<div class="col-12 col-md-6" style="padding: 10px 15px;">
|
|
19
|
+
<div style="background-color: #ffffff; border: 1px solid #ececec; padding: 10px 10px 42px; {{^buttonText}}padding-bottom: 10px;{{/buttonText}} position: relative; height: 100%; font-size: 16px;">
|
|
20
|
+
<div style="color: #00747a; margin-bottom: 10px;">
|
|
21
|
+
<img src="https://files.procell.com.cn/assets/images/article/202505091550/1722403448475807.png" style="width: 24px; margin-top: -6px;" />
|
|
22
|
+
<strong style="font-weight: bolder;">{{title}}</strong>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
{{#content}}
|
|
26
|
+
<div>{{.}}</div>
|
|
27
|
+
{{/content}}
|
|
28
|
+
|
|
29
|
+
{{#condition}}
|
|
30
|
+
<div class="d-flex align-items-center">
|
|
31
|
+
<strong style="margin-top: -6px; margin-right: 5px; font-weight: bolder; font-family: 微软雅黑;">·</strong>
|
|
32
|
+
<span>{{.}}</span>
|
|
33
|
+
</div>
|
|
34
|
+
{{/condition}}
|
|
35
|
+
|
|
36
|
+
{{#note}}
|
|
37
|
+
<div style="font-size: 14px;">{{.}}</div>
|
|
38
|
+
{{/note}}
|
|
39
|
+
|
|
40
|
+
{{#buttonText}}
|
|
41
|
+
<a {{#link}}href="{{link}}"{{/link}} style="text-decoration: none; background-color: #4a8d90; color: #ffffff; padding: 3px 8px; border-radius: 4px; position: absolute; bottom: 10px; left: 10px; cursor: pointer; font-size: 12px;">{{buttonText}}</a>
|
|
42
|
+
{{/buttonText}}
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
{{/lists}}
|
|
46
|
+
|
|
47
|
+
{{#comment}}
|
|
48
|
+
<div class="col-12" style="padding: 10px 15px;">
|
|
49
|
+
<div style="background: #ffffff; border: 1px solid #ececec; padding: 10px; font-size: 16px;">
|
|
50
|
+
<span style="color: #ff0000;">*</span>{{comment}}
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
{{/comment}}
|
|
54
|
+
</div>
|
|
55
|
+
{{/activity}}
|
|
56
|
+
|
|
57
|
+
{{#needSearch}}
|
|
58
|
+
<div class="search-box-wrapper mt-3 mb-4">
|
|
59
|
+
<form id="search_form_top-detail" onsubmit="return false;" action="" accept-charset="utf-8" class="position-relative needs-validation" novalidate="">
|
|
60
|
+
<div class="col-12 col-md-6 pl-0 pr-0 pr-md-3">
|
|
61
|
+
<div class="d-flex">
|
|
62
|
+
<div class="position-relative flex-grow-1 form-group mb-0 ">
|
|
63
|
+
<div class="search-clear" >
|
|
64
|
+
<i class="fa-solid fa-close"></i>
|
|
65
|
+
</div>
|
|
66
|
+
<input id="keywords_top-detail" autocomplete="off" class="py-2 w-100 border text-truncate search-text bg-white" type="text" name="keywords" placeholder="请输入产品货号、名称等关键词" required="" />
|
|
67
|
+
<div id="error_keywords-detail" class="tip keywords-error invalid-feedback keywordstips-detail" >请输入关键词!</div>
|
|
68
|
+
</div>
|
|
69
|
+
<input id="search_btn_top-detail" class="search_btn-detail btn btn-primary border-0 rounded-0 position-relative" type="button" value="">
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</form>
|
|
73
|
+
|
|
74
|
+
<div id="search-result-list-empty" class="search-result-list-empty mt-4" style="display: none;">
|
|
75
|
+
<div class="px-3">
|
|
76
|
+
<div class="py-3 fs_20">
|
|
77
|
+
<i class="iconfont icon-dianji pr-1 fs_18 text-primary"></i>很抱歉,没有找到“<span id="searchedKeywords" class="text-danger"></span>”的相关产品。
|
|
78
|
+
</div>
|
|
79
|
+
<div class="row mx-0">
|
|
80
|
+
<div class="col-lg-8 p-0">
|
|
81
|
+
<h5 class="fs_16">搜索建议</h5>
|
|
82
|
+
<p> > 确保所有单词拼写正确 </p>
|
|
83
|
+
<p> > 尝试不同关键字 </p>
|
|
84
|
+
<p> > <a class="pl-0 text-primary" href="/about_us-contact_us">联系我们</a>,我们会帮您找到您需要的产品。</p>
|
|
85
|
+
</div>
|
|
86
|
+
<div class="col-lg-4 p-0 text-center text-md-right">
|
|
87
|
+
<img class="img-fluid lazy_load d-inline-block" src="//files.procell.com.cn/assets/images/loading.png" data-src="//files.procell.com.cn/assets/images/search/empty.jpg" style="height: 158px;"/>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<div class="search-result-list-detail w-100 mt-4" style="display: none;">
|
|
94
|
+
<div draggable="false" data-v-c8b454df="">
|
|
95
|
+
<div style="background: #f9fafb; margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; font-size: 16px;">
|
|
96
|
+
<div style="text-align: center;">
|
|
97
|
+
<div style="width: 100%; overflow-x: auto;">
|
|
98
|
+
<table style="box-sizing: border-box; border-collapse: collapse; width: 100%; text-align: center;" border="1" width="100%" cellpadding="4">
|
|
99
|
+
<thead>
|
|
100
|
+
<tr class="firstRow" style="background: #4a8d90;">
|
|
101
|
+
<th style="border-style: none none solid none; box-sizing: border-box; font-size: 14.4px; z-index: 10; top: 0px; border-bottom-color: #cacaca; border-bottom-width: 1px; background-color: #4a8d90; text-align: inherit; min-width: 102px; color: #fff;">货号</th>
|
|
102
|
+
<th style="border-style: none none solid none; box-sizing: border-box; font-size: 14.4px; z-index: 10; top: 0px; border-bottom-color: #cacaca; border-bottom-width: 1px; background-color: #4a8d90; text-align: inherit; min-width: 270px; color: #fff;">产品名称</th>
|
|
103
|
+
<th style="border-style: none none solid none; box-sizing: border-box; font-size: 14.4px; z-index: 10; top: 0px; border-bottom-color: #cacaca; border-bottom-width: 1px; background-color: #4a8d90; text-align: inherit; min-width: 64px; color: #fff;">规格</th>
|
|
104
|
+
</tr>
|
|
105
|
+
</thead>
|
|
106
|
+
|
|
107
|
+
<tbody id="search-result-list-detail-tbody" class="use-table" style="text-align: center;">
|
|
108
|
+
<!-- <tr>
|
|
109
|
+
<td><a style="color: #00747a; text-decoration: none;" href="/p/mbmmsc-osteogenic-differentiation-medium-pd-003-71613">PD-003</a></td>
|
|
110
|
+
<td>小鼠骨髓间充质干细胞成骨诱导分化培养基</td>
|
|
111
|
+
<td>200 mL</td>
|
|
112
|
+
</tr> -->
|
|
113
|
+
</tbody>
|
|
114
|
+
</table>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
{{/needSearch}}
|
|
122
|
+
|
|
123
|
+
<div id="searchedHidden">searchedHidden</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "juice-email-cli",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI tool to generate email-client-compatible HTML with juice (CSS inlining) + Mustache templating + minification",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"url": "https://github.com/GuoSirius/juice-cli/issues"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@inquirer/prompts": "^8.
|
|
40
|
+
"@inquirer/prompts": "^8.5.0",
|
|
41
41
|
"chalk": "^5.6.2",
|
|
42
42
|
"commander": "^14.0.3",
|
|
43
43
|
"html-minifier-terser": "^7.2.0",
|
package/src/index.js
CHANGED
|
@@ -65,6 +65,71 @@ export function findConfigs(configPath, inputFile) {
|
|
|
65
65
|
return { highPriorityPath, homePath: resolveHomeConfig() };
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
// ─── 列出目录下所有配置文件 ─────────────────────────────────────────────────────
|
|
69
|
+
|
|
70
|
+
function findYamlConfigFiles(dir) {
|
|
71
|
+
if (!fs.existsSync(dir)) return [];
|
|
72
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
73
|
+
return entries
|
|
74
|
+
.filter(e => e.isFile() && /\.ya?ml$/i.test(e.name) && e.name !== '_meta.yaml' && e.name !== '_meta.yml')
|
|
75
|
+
.map(e => ({ name: e.name, path: path.join(dir, e.name) }));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
async function resolveProjectConfig(inputFile) {
|
|
79
|
+
const inputDir = path.dirname(path.resolve(inputFile));
|
|
80
|
+
const yamlFiles = findYamlConfigFiles(inputDir);
|
|
81
|
+
|
|
82
|
+
if (yamlFiles.length === 0) return null;
|
|
83
|
+
|
|
84
|
+
if (yamlFiles.length === 1) {
|
|
85
|
+
const name = yamlFiles[0].name;
|
|
86
|
+
if (name === 'juice.yaml' || name === 'juice.yml') {
|
|
87
|
+
return yamlFiles[0].path;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const { select, input } = await import('@inquirer/prompts');
|
|
92
|
+
|
|
93
|
+
const choices = yamlFiles.map(f => {
|
|
94
|
+
const isOptimal = f.name === 'juice.yaml';
|
|
95
|
+
if (isOptimal) {
|
|
96
|
+
return {
|
|
97
|
+
name: `${chalk.green('●')} ${f.name} ${chalk.green('(最优配对)')}`,
|
|
98
|
+
value: { type: 'file', path: f.path },
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
name: ` ${f.name}`,
|
|
103
|
+
value: { type: 'file', path: f.path },
|
|
104
|
+
};
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
const defaultIdx = yamlFiles.findIndex(f => f.name === 'juice.yaml');
|
|
108
|
+
|
|
109
|
+
choices.push(
|
|
110
|
+
{ name: ' [自定义] 输入其他路径...', value: { type: 'custom' } },
|
|
111
|
+
{ name: ' [跳过] 不使用项目配置', value: { type: 'skip' } },
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
const result = await select({
|
|
115
|
+
message: '请选择配置文件:',
|
|
116
|
+
choices,
|
|
117
|
+
default: defaultIdx >= 0 ? defaultIdx : 0,
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
if (result.type === 'custom') {
|
|
121
|
+
const customPath = await input({ message: '请输入配置文件路径:' });
|
|
122
|
+
const resolved = path.resolve(customPath);
|
|
123
|
+
if (!fs.existsSync(resolved)) {
|
|
124
|
+
throw new Error(`指定的配置文件不存在:${resolved}`);
|
|
125
|
+
}
|
|
126
|
+
return resolved;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (result.type === 'skip') return null;
|
|
130
|
+
return result.path;
|
|
131
|
+
}
|
|
132
|
+
|
|
68
133
|
// ─── 配置文件加载 ─────────────────────────────────────────────────────────────
|
|
69
134
|
|
|
70
135
|
export function loadYaml(filePath) {
|
|
@@ -207,7 +272,21 @@ export async function run({ file, config: configPath }) {
|
|
|
207
272
|
process.exit(1);
|
|
208
273
|
}
|
|
209
274
|
|
|
210
|
-
|
|
275
|
+
let highPriorityPath = null;
|
|
276
|
+
|
|
277
|
+
if (configPath) {
|
|
278
|
+
const resolved = path.resolve(configPath);
|
|
279
|
+
if (!fs.existsSync(resolved)) {
|
|
280
|
+
throw new Error(`指定的配置文件不存在:${resolved}`);
|
|
281
|
+
}
|
|
282
|
+
highPriorityPath = resolved;
|
|
283
|
+
} else {
|
|
284
|
+
spinner.stop();
|
|
285
|
+
highPriorityPath = await resolveProjectConfig(inputFile);
|
|
286
|
+
spinner.start();
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
const homePath = resolveHomeConfig();
|
|
211
290
|
const { config, layers } = buildConfig(highPriorityPath, homePath);
|
|
212
291
|
const encoding = (config.output && config.output.encoding) || 'utf8';
|
|
213
292
|
|