Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat: Add cli flag to omit file header comment on stdout * docs: Add command line flag for omitting file header comment to docs, Cleanup markdown tables * docs: Reformat table headers for cli flags Overlooked on the first try ...
- Loading branch information
1 parent
4f83e2c
commit 9ecacf6
Showing
3 changed files
with
52 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
export default ({ compiled: { html }, file }) => | ||
export default ({ compiled: { html }, file }, addFileHeaderComment) => | ||
new Promise((resolve) => { | ||
process.stdout.write(`<!-- FILE: ${file} -->\n${html}\n`, resolve) | ||
let output = '' | ||
if(addFileHeaderComment) { | ||
output = `<!-- FILE: ${file} -->\n` | ||
} | ||
output += `${html}\n` | ||
|
||
process.stdout.write(output, resolve) | ||
}) |