gitbook-comment
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "gitbook-comment", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Generate Markdown file from comments in source code", | ||
@@ -5,0 +5,0 @@ "main": "src/gitbook-comment.js", |
@@ -47,2 +47,12 @@ // # Markdown Generator | ||
const cleanupDocs = (path, ignores) => { | ||
// Make sure README.md files are not deleted in the project | ||
ignores = ['README.md', ...ignores] | ||
const files = file.listFilesSync(path, ['md'], ignores) | ||
const totalFiles = files.length | ||
print(`Cleaning up all generated doc files (${totalFiles})`.red.bold) | ||
file.cleanFilesSync(files); | ||
return true | ||
} | ||
// ## CLI Commands | ||
@@ -77,8 +87,4 @@ // There are 2 commands in this CLI | ||
.action((cmd) => { | ||
// Make sure README.md files are not deleted in the project | ||
cmd.ignores = ['README.md', ...cmd.ignores.split(',')] | ||
const files = file.listFilesSync(cmd.path, ['md'], cmd.ignores) | ||
const totalFiles = files.length | ||
print(`Cleaning up all generated doc files (${totalFiles})`.red.bold) | ||
file.cleanFilesSync(files); | ||
cmd.ignores = cmd.ignores.split(',') | ||
cleanupDocs(cmd.path, cmd.ignores) | ||
}) | ||
@@ -133,2 +139,6 @@ | ||
print(`Pull updates from remote branch '${branch}'`.green.bold) | ||
return cleanupDocs(cmd.path, cmd.ignores) | ||
}) | ||
.then((success) => { | ||
if (!success) return false | ||
return generateDocs(cmd.path, cmd.extensions, cmd.ignores) | ||
@@ -135,0 +145,0 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10804
245