Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gitbook-comment

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitbook-comment - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"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 @@ })

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc