mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
adjust console log message if only verifying, if copied actually happened
This commit is contained in:
parent
703b7eb91d
commit
d38f0e9e03
@ -49,11 +49,18 @@ const verifyAndCopy = (file: string, content?: string) => {
|
||||
// Files are same, skip.
|
||||
return;
|
||||
}
|
||||
console.log(`File changed: ${outFile}`);
|
||||
let changeMsg = 'changed';
|
||||
if (verifyOnly) {
|
||||
changeMsg = 'to be changed';
|
||||
}
|
||||
let logMsg = ` File ${changeMsg}: ${outFile}`
|
||||
|
||||
filesWereChanged = true;
|
||||
if (!verifyOnly) {
|
||||
writeFileSync(outFile, newBuffer);
|
||||
logMsg += ' ...and copied to /docs'
|
||||
}
|
||||
console.log(logMsg);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user