Skip to content

docs-folder-manager

DocsFolderManager

The DocsFolderManager class provides functionalities to manage the documentation folder. It offers methods to delete and create the docs folder, abstracting the underlying operations.

Kind: global class

docsFolderManager.delete(docsFolder, rmPattern) ⇒ Promise.<void>

Deletes the specified documentation folder based on the provided pattern.

Kind: instance method of DocsFolderManager
Returns: Promise.<void> - A promise that resolves once the deletion is complete.

ParamTypeDescription
docsFolderstringThe path to the documentation folder to delete.
rmPatternArray.<string>An array of patterns specifying which files or directories to exclude from deletion.

Example

js
const manager = new DocsFolderManager();
await manager.delete('./docs', ['exclude-pattern']);
const manager = new DocsFolderManager();
await manager.delete('./docs', ['exclude-pattern']);

docsFolderManager.create(docsFolder)

Creates the specified documentation folder.

Kind: instance method of DocsFolderManager

ParamTypeDescription
docsFolderstringThe path to the documentation folder to create.

Example

js
const manager = new DocsFolderManager();
manager.create('./docs');
const manager = new DocsFolderManager();
manager.create('./docs');

Released under the MIT License.