Methods
(async) factory(pkgName) → {Promise.<class>}
Plugin factory.
Never call this function directly!!! It's only-meant to be called by the Bajo framework during plugin initialization.
Parameters:
| Name | Type | Description |
|---|---|---|
pkgName | string | NPM package name |
Returns:
Promise that resolves to the BajoTemplate class
- Type:
- Promise.<class>
Type Definitions
TImportsResult
Result of BajoTemplate#buildCompileImports method.
Type:
Properties- object
| Name | Type | Description |
|---|---|---|
_ | object | Utility library (lodash) |
_t | module:Imports~FnTranslate | Translation function |
_format | module:Imports~FnFormat | Format function |
_findRoute | module:Imports~FnFindRoute | Find route function |
_routePath | module:Imports~FnRoutePath | Route path function |
_titleize | module:Imports~FnTitleize | Titleize function |
_hasPlugin | module:Imports~FnHasPlugin | Check if plugin exists function |
_jsonStringify | module:Imports~FnJsonStringify | JSON stringify function |
_parseMarkdown | module:Imports~FnParseMarkdown | Parse markdown function |
_excerpt | module:Imports~FnExcerpt | Excerpt function |
_dump | module:Imports~FnDump | Dump function |
_getSetting | module:Imports~FnGetSetting | Get setting function |
- Source