mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-12 20:09:46 +02: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.
|
// Files are same, skip.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(`File changed: ${outFile}`);
|
let changeMsg = 'changed';
|
||||||
|
if (verifyOnly) {
|
||||||
|
changeMsg = 'to be changed';
|
||||||
|
}
|
||||||
|
let logMsg = ` File ${changeMsg}: ${outFile}`
|
||||||
|
|
||||||
filesWereChanged = true;
|
filesWereChanged = true;
|
||||||
if (!verifyOnly) {
|
if (!verifyOnly) {
|
||||||
writeFileSync(outFile, newBuffer);
|
writeFileSync(outFile, newBuffer);
|
||||||
|
logMsg += ' ...and copied to /docs'
|
||||||
}
|
}
|
||||||
|
console.log(logMsg);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user