# loadPlugin(directories, prefix, pathOrPackage)
Load plugin from file or directory. const plugin = await loadPlugin([process.cwd()], null, './renderer.js'); const plugin = await loadPlugin(['../node_modules'], 'doxdox-renderer-', 'json');
Parameters
Name | Types | Description |
---|---|---|
directories | string[] |
Root directories to load plugin from. |
prefix | string |
Optional prefix to attach to the pathOrPackage. |
pathOrPackage | string |
Path or package name. |
Returns
Promise<T | null>
Plugin default method.
# loadPluginFromFile(path)
Load plugin from path. const plugin = await loadPluginFromFile('./doxdox-renderer-json/dist/index.js');
Parameters
Name | Types | Description |
---|---|---|
path | string |
Plugin file path. |
Returns
Promise<T | null>
Plugin default method.
# loadPluginFromPackagePath(path)
Load plugin from package directory. const plugin = await loadPluginFromPackagePath('./doxdox-parser-jsdoc');
Parameters
Name | Types | Description |
---|---|---|
path | string |
Directory containing a plugin package. |
Returns
Promise<T | null>
Plugin default method.
# findFileInPath(input, fileName)
Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));
Parameters
Name | Types | Description |
---|---|---|
input | string |
Directory to check for file. |
fileName | string |
File name to check for. |
Returns
Promise<string | null>
Path to package.json file.
# findParentNodeModules(currentDirectory, maxDepth)
Finds the closest node_module folder in the parent directories.
Parameters
Name | Types | Description |
---|---|---|
currentDirectory | string |
Current directory. |
maxDepth | number |
Optional max depth. |
Returns
Promise<string | null>
Path to node_modules directory.
# getProjectPackage()
Returns basic information from a projects package file.
Returns
Promise<Package>
Basic information from a package file.
# getRootDirPath(url)
Get the root directory of the package, supplied path or URL.
Parameters
Name | Types | Description |
---|---|---|
url | string |
Optional path or URL. |
Returns
string
Directory path.
# isDirectory(path)
Checks to see if path is a directory.
Parameters
Name | Types | Description |
---|---|---|
path | string |
Path to check. |
Returns
Promise<boolean>
# isFile(path)
Checks to see if path is a file.
Parameters
Name | Types | Description |
---|---|---|
path | string |
Path to check. |
Returns
Promise<boolean>
# multiLinePatternMatch(content, pattern)
Return information about pattern if found within contents.
Parameters
Name | Types | Description |
---|---|---|
content | string |
Full contents to search for pattern in. |
pattern | string |
Pattern to look for in contents. |
Returns
{ start: number; end?: number; matched: boolean }
# parseConfigFromCLI(rawFlags)
Parse config key/value pairs from raw CLI flags. console.log(await parseConfigFromCLI([['-c', 'key=value']]));
Parameters
Name | Types | Description |
---|---|---|
rawFlags | [string, string |
boolean][] |
Returns
{ [key in string]: string | boolean }
Configs key/value pairs.
# parseIgnoreConfig(contents)
Parse contents of ignore file. console.log(await parseIgnoreConfig('node_modules/'));
Parameters
Name | Types | Description |
---|---|---|
contents | string |
Contents of ignore file. |
Returns
string[]
List of ignored paths and files.
# getStyleProperty(element, propertyName)
Get the value of a property on an element.
Parameters
Name | Types | Description |
---|---|---|
element | HTMLElement |
- The element. |
propertyName | string |
- The name of the property. |
Returns
*
The value of the property.
# module.zip(jacket)
Zip up a jacket.
Parameters
Name | Types | Description |
---|---|---|
jacket | Jacket |
- The jacket to zip up. |
# tag()
# Tag(tagName)
Create a new Tag.
Parameters
Name | Types | Description |
---|---|---|
tagName | string |
- The name of the tag. |
# Turtleneck(size)
Create a new Turtleneck.
Parameters
Name | Types | Description |
---|---|---|
size | string |
- The size (XS , S , M , L , XL , or XXL ). |
# utils.isInHead(element)
Determine if an element is in the document head.
Parameters
Name | Types | Description |
---|---|---|
element | HTMLElement |
- The element. |
Returns
boolean
Set to `true` if the element is in the document head, `false` otherwise.
# Book(title, author)
Represents a book.
Parameters
Name | Types | Description |
---|---|---|
title | string |
- The title of the book. |
author | string |
- The author of the book. |
# blend(color1, color2)
Blend two colors together.
Parameters
Name | Types | Description |
---|---|---|
color1 | string |
- The first color, in hexadecimal format. |
color2 | string |
- The second color, in hexadecimal format. |
Returns
string
The blended color.
# blend(color1, color2)
Blend two colors together.
Parameters
Name | Types | Description |
---|---|---|
color1 | string |
- The first color, in hexadecimal format. |
color2 | string |
- The second color, in hexadecimal format. |
Returns
string
The blended color.
# blend(color1, color2)
Blend two colors together.
Parameters
Name | Types | Description |
---|---|---|
color1 | string |
- The first color, in hexadecimal format. |
color2 | string |
- The second color, in hexadecimal format. |
Returns
string
The blended color.
# darken(color, percent)
Darken a color by the given percentage.
Parameters
Name | Types | Description |
---|---|---|
color | string |
- The color, in hexadecimal format. |
percent | number |
- The percentage, ranging from 0 to 100. |
Returns
string
The darkened color.
# module.exports(color1, color2)
Blend two colors together.
Parameters
Name | Types | Description |
---|---|---|
color1 | string |
- The first color, in hexadecimal format. |
color2 | string |
- The second color, in hexadecimal format. |
Returns
string
The blended color.
# module.exports.darken(color, percent)
Darken a color by the given percentage.
Parameters
Name | Types | Description |
---|---|---|
color | string |
- The color, in hexadecimal format. |
percent | number |
- The percentage, ranging from 0 to 100. |
Returns
string
The darkened color.
# this.Book(title)
Create a new Book.
Parameters
Name | Types | Description |
---|---|---|
title | string |
- The title of the book. |
# findFileInPath(input, fileName)
Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));
Parameters
Name | Types | Description |
---|---|---|
input | string |
Directory to check for file. |
fileName | string |
File name to check for. |
Returns
Promise<string | null>
Path to package.json file.
# getRootDirPath(url)
Get the root directory of the package, supplied path or URL.
Parameters
Name | Types | Description |
---|---|---|
url | string |
Optional path or URL. |
Returns
string
Directory path.
# constructor(x, y)
Create a point.
Parameters
Name | Types | Description |
---|---|---|
x | number |
- The x value. |
y | number |
- The y value. |
# constructor(x, y, width)
Create a dot.
Parameters
Name | Types | Description |
---|---|---|
x | number |
- The x value. |
y | number |
- The y value. |
width | number |
- The width of the dot, in pixels. |
# fromString(str)
Convert a string containing two comma-separated numbers into a point.
Parameters
Name | Types | Description |
---|---|---|
str | string |
- The string containing two comma-separated numbers. |
Returns
Point
A Point object.
# blend(color1, color2)
Blend two colors together.
Parameters
Name | Types | Description |
---|---|---|
color1 | string |
- The first color, in hexadecimal format. |
color2 | string |
- The second color, in hexadecimal format. |
Returns
string
The blended color.
# toRgb(color)
Get the red, green, and blue values of a color.
Parameters
Name | Types | Description |
---|---|---|
color | string |
- A color, in hexadecimal format. |
# findFileInPath(input, fileName)
Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));
Parameters
Name | Types | Description |
---|---|---|
input | string |
Directory to check for file. |
fileName | string |
File name to check for. |
Returns
Promise<string | null>
Path to package.json file.
# getRootDirPath(url)
Get the root directory of the package, supplied path or URL.
Parameters
Name | Types | Description |
---|---|---|
url | string |
Optional path or URL. |
Returns
string
Directory path.
# Project.assign(employee, employee.name, employee.department)
Assign the project to an employee.
Parameters
Name | Types | Description |
---|---|---|
employee | Object |
- The employee who is responsible for the project. |
employee.name | string |
- The name of the employee. |
employee.department | string |
- The employee's department. |
# Project.assign(employee, employee.name, employee.department)
Assign the project to an employee.
Parameters
Name | Types | Description |
---|---|---|
employee | Object |
- The employee who is responsible for the project. |
employee.name | string |
- The name of the employee. |
employee.department | string |
- The employee's department. |
# Project.assign(employees, employees[].name, employees[].department)
Assign the project to a list of employees.
Parameters
Name | Types | Description |
---|---|---|
employees | Object[] |
- The employees who are responsible for the project. |
employees[].name | string |
- The name of an employee. |
employees[].department | string |
- The employee's department. |
# sum(num)
Returns the sum of all numbers passed to the function.
Parameters
Name | Types | Description |
---|---|---|
num | ...number |
- A positive or negative number. |
# constructor(x, y)
Create a point.
Parameters
Name | Types | Description |
---|---|---|
x | number |
- The x value. |
y | number |
- The y value. |
# publicMethod()
# publicMethod()
# findFileInPath(input, fileName)
Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));
Parameters
Name | Types | Description |
---|---|---|
input | string |
Directory to check for file. |
fileName | string |
File name to check for. |
Returns
Promise<string | null>
Path to package.json file.
# getRootDirPath(url)
Get the root directory of the package, supplied path or URL.
Parameters
Name | Types | Description |
---|---|---|
url | string |
Optional path or URL. |
Returns
string
Directory path.
# findFileInPath(input, fileName)
Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));
Parameters
Name | Types | Description |
---|---|---|
input | string |
Directory to check for file. |
fileName | string |
File name to check for. |
Returns
Promise<string | null>
Path to package.json file.
# getRootDirPath(url)
Get the root directory of the package, supplied path or URL.
Parameters
Name | Types | Description |
---|---|---|
url | string |
Optional path or URL. |
Returns
string
Directory path.
# findFileInPath(input, fileName)
Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));
Parameters
Name | Types | Description |
---|---|---|
input | string |
Directory to check for file. |
fileName | string |
File name to check for. |
Returns
Promise<string | null>
Path to package.json file.
# getRootDirPath(url)
Get the root directory of the package, supplied path or URL.
Parameters
Name | Types | Description |
---|---|---|
url | string |
Optional path or URL. |
Returns
string
Directory path.
# findFileInPath(input, fileName)
Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));
Parameters
Name | Types | Description |
---|---|---|
input | string |
Directory to check for file. |
fileName | string |
File name to check for. |
Returns
Promise<string | null>
Path to package.json file.
# getRootDirPath(url)
Get the root directory of the package, supplied path or URL.
Parameters
Name | Types | Description |
---|---|---|
url | string |
Optional path or URL. |
Returns
string
Directory path.
# findFileInPath(input, fileName)
Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));
Parameters
Name | Types | Description |
---|---|---|
input | string |
Directory to check for file. |
fileName | string |
File name to check for. |
Returns
Promise<string | null>
Path to package.json file.
# getRootDirPath(url)
Get the root directory of the package, supplied path or URL.
Parameters
Name | Types | Description |
---|---|---|
url | string |
Optional path or URL. |
Returns
string
Directory path.
# findFileInPath(input, fileName)
Finds file in path. console.log(await findFileInPath('./', 'package.json')); console.log(await findFileInPath('../', 'package.json')); console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));
Parameters
Name | Types | Description |
---|---|---|
input | string |
Directory to check for file. |
fileName | string |
File name to check for. |
Returns
Promise<string | null>
Path to package.json file.
# getRootDirPath(url)
Get the root directory of the package, supplied path or URL.
Parameters
Name | Types | Description |
---|---|---|
url | string |
Optional path or URL. |
Returns
string
Directory path.