juice-email-cli 2.3.10 → 2.3.11
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 +11 -1
- package/package.json +1 -1
- package/src/init.js +3 -3
package/README.md
CHANGED
|
@@ -122,9 +122,12 @@ juice view -i elabscience
|
|
|
122
122
|
### 拷贝资源到当前目录
|
|
123
123
|
|
|
124
124
|
```bash
|
|
125
|
-
#
|
|
125
|
+
# 交互式选择(每步支持返回/退出)
|
|
126
126
|
juice init
|
|
127
127
|
|
|
128
|
+
# 拷贝整个 EDM 资源库
|
|
129
|
+
juice init --all
|
|
130
|
+
|
|
128
131
|
# 从指定 EDM 路径拷贝
|
|
129
132
|
juice init elabscience/templates/standard
|
|
130
133
|
|
|
@@ -134,6 +137,13 @@ juice init --snippet edm/elabscience/series/literature/default/snippet.html
|
|
|
134
137
|
juice init --config edm/elabscience/series/literature/default/juice.yaml
|
|
135
138
|
```
|
|
136
139
|
|
|
140
|
+
交互拷贝进入变体后提供三个操作:
|
|
141
|
+
- `🧩 仅片段+配置` — 快捷拷贝片段 HTML + juice.yaml(跳过模板)
|
|
142
|
+
- `✅ 确认拷贝` — 按当前选择执行
|
|
143
|
+
- `🔄 自定义选择` — 打开多选 checkbox 调整
|
|
144
|
+
|
|
145
|
+
拷贝模板时自动附带 `favicon.ico`。配置文件冲突自动加版本号。
|
|
146
|
+
|
|
137
147
|
### 参数说明
|
|
138
148
|
|
|
139
149
|
| 参数 | 简写 | 说明 |
|
package/package.json
CHANGED
package/src/init.js
CHANGED
|
@@ -204,13 +204,13 @@ async function interactiveInit(edmDir, cwd) {
|
|
|
204
204
|
.map(c => c.name.replace(/^[^\s]+\s/, ''));
|
|
205
205
|
const summary = picked.length > 0 ? picked.join(' + ') : '(未选择)';
|
|
206
206
|
const mainChoices = [];
|
|
207
|
-
if (picked.length > 0) {
|
|
208
|
-
mainChoices.push({ name: `✅ 确认拷贝(${summary})`, value: 'confirm' });
|
|
209
|
-
}
|
|
210
207
|
// Quick shortcut: snippet + config only (skip template)
|
|
211
208
|
if (variant && copyItems.some(c => c.value === 'snippet') && copyItems.some(c => c.value === 'config')) {
|
|
212
209
|
mainChoices.push({ name: '🧩 仅片段 + 配置', value: 'snippet-config' });
|
|
213
210
|
}
|
|
211
|
+
if (picked.length > 0) {
|
|
212
|
+
mainChoices.push({ name: `✅ 确认拷贝(${summary})`, value: 'confirm' });
|
|
213
|
+
}
|
|
214
214
|
mainChoices.push({ name: `🔄 自定义选择(${summary})`, value: 'edit' });
|
|
215
215
|
|
|
216
216
|
const action = await selectWithNav(
|