Skip to content

Commit 3dd81fa

Browse files
committed
feat: only show need update docs
1 parent 8897d28 commit 3dd81fa

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

packages/translate/src/main.ts

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,22 @@ export async function main({
158158
targetPath,
159159
});
160160

161-
tableData.push({
162-
Source: sourcePath,
163-
...(verbose ? { Target: targetPath } : {}),
164-
'Should update?': shouldUpdate ? '✅ Yes' : '❌ No',
165-
Chunks: chunks,
166-
Reason: reason,
167-
});
161+
if (verbose) {
162+
tableData.push({
163+
Source: sourcePath,
164+
...(verbose ? { Target: targetPath } : {}),
165+
'Should update?': shouldUpdate ? '✅ Yes' : '❌ No',
166+
Chunks: chunks,
167+
Reason: reason,
168+
});
169+
} else if (shouldUpdate) {
170+
tableData.push({
171+
Source: sourcePath,
172+
Target: targetPath,
173+
'Should update?': '✅ Yes',
174+
Reason: reason,
175+
});
176+
}
168177

169178
if (shouldUpdate) {
170179
tasks.push({

0 commit comments

Comments
 (0)