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>
- .create(docsFolder)
- .delete(docsFolder, rmPattern) ⇒
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.
Param | Type | Description |
---|---|---|
docsFolder | string | The path to the documentation folder to delete. |
rmPattern | Array.<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
Param | Type | Description |
---|---|---|
docsFolder | string | The path to the documentation folder to create. |
Example
js
const manager = new DocsFolderManager();
manager.create('./docs');
const manager = new DocsFolderManager();
manager.create('./docs');