Config
Crawl config loader
Static Method Summary
Static Public Methods | ||
public static |
async ensureScript(scriptP: string): Promise<UserScript|null> Load the user supplied script (if it exists) and perform validation of it |
|
public static |
Normalizes the supplied seeds. |
|
public static |
async loadConfig(configPath: string): Promise<CrawlConfig> Loads the config file and performs the preliminary normalization |
Static Public Methods
public static async ensureScript(scriptP: string): Promise<UserScript|null> source
Load the user supplied script (if it exists) and perform validation of it
Params:
Name | Type | Attribute | Description |
scriptP | string |
|
The path to the user script |
public static async ensureSeeds(seeds: string | string[], mode: string, depth: number): Promise<Seed|Seed[]> source
Normalizes the supplied seeds. If it value of the seeds field is a string loads the seeds from the file
public static async loadConfig(configPath: string): Promise<CrawlConfig> source
Loads the config file and performs the preliminary normalization
Params:
Name | Type | Attribute | Description |
configPath | string | Path to this crawls config file |