Docpad Class
The DocPad Class. Contains methods for managing the DocPad application. This includes managing a DocPad projects files and documents, watching directories, emitting events and managing the node.js/express.js web server. Extends https://github.com/bevry/event-emitter-grouped
Constructor
Docpad
()
Item Index
Methods
- action
- addCollection
- addModel
- addModels
- attachModelEvents
- checkRequest
- clean
- compareVersion
- constructor
- contextualizeFiles
- createDocument
- createError
- createFile
- createModel
- createModels
- createProgress
- createRegenerateTimer
- destroy
- destroyBlocks
- destroyCollection
- destroyCollections
- destroyDatabase
- destroyLoggers
- destroyPlugins
- destroyProgress
- destroyRegenerateTimer
- destroyServer
- destroyWatchers
- eachBlock
- eachCollection
- emitParallel
- emitSerial
- error
- extendCollections
- fatal
- fixNodePackageVersions
- generate
- getActionRunner
- getBlock
- getBlocks
- getCollection
- getCollections
- getConfig
- getConfigPath
- getDatabase
- getDatabaseSafe
- getDebugging
- getEnvironment
- getEnvironments
- getErrorRunner
- getEvents
- getExchange
- getFile
- getFileAtPath
- getFileById
- getFileByRoute
- getFileBySelector
- getFileByUrl
- getFiles
- getFilesAtPath
- getHostname
- getIgnoreOpts
- getLocale
- getLogger
- getLoggers
- getLogLevel
- getPlugin
- getPort
- getProcessPlatform
- getProcessVersion
- getServer
- getServerUrl
- getSimpleServerUrl
- getSkeletons
- getTemplateData
- getTrackRunner
- getUrlPathname
- getVersion
- getVersionString
- hasPlugins
- identify
- init
- initGitRepo
- initInstall
- initNodeModules
- initSkeleton
- inspector
- install
- installNodeModule
- installSkeleton
- isIgnoredPath
- load
- loadAndRenderDocument
- loadConfigPath
- loadConfigUrl
- loadDocument
- loadedPlugin
- loadLocale
- loadPlugin
- loadPlugins
- loadPluginsIn
- logError
- mergeConfigurations
- notify
- notifyError
- parseDirectory
- parseDocumentDirectory
- parseFileDirectory
- ready
- render
- renderData
- renderDocument
- renderFiles
- renderPath
- renderText
- resetCollections
- run
- scandir
- selectSkeleton
- serveDocument
- server
- serverMiddleware404
- serverMiddleware500
- serverMiddlewareHeader
- serverMiddlewareRouter
- setBlock
- setBlocks
- setCollection
- setCollections
- setConfig
- setInstanceConfig
- setLoggers
- setLogLevel
- setServer
- skeleton
- skeletonEmpty
- subscribe
- track
- trackError
- uninstall
- uninstallNodeModule
- update
- updateUserConfig
- upgrade
- useSkeleton
- warn
- watch
- watchdir
- writeFiles
Properties
- actionRunnerInstance
- BasePlugin
- blocks
- Collection
- collections
- config
- corePath
- database
- databaseTempCache
- debugLogPath
- DocumentModel
- ElementsCollection
- errorRunnerInstance
- Events
- exchange
- FileModel
- filesByOutPath
- filesBySelector
- filesByUrl
- FilesCollection
- generated
- generateEnded
- generateStarted
- generating
- initialConfig
- initialTemplateData
- instanceConfig
- libPath
- loadedPlugins
- locale
- localePath
- log
- loggerInstances
- mainPath
- MetaCollection
- Model
- packagePath
- PluginLoader
- pluginsTemplateData
- pluginVersion
- QueryCollection
- regenerateTimer
- ScriptsCollection
- serverExpress
- serverHttp
- skeletonsCollection
- slowPlugins
- string array of event names
- string constant
- StylesCollection
- trackRunnerInstance
- userConfig
- userConfigPath
- version
- watchers
- websiteConfig
- websitePackageConfig
Methods
action
-
args
Apply the passed DocPad action arguments
Parameters:
-
args
Object
Returns:
addCollection
-
collection
Add a collection
Parameters:
-
collection
Object
addModel
-
model
-
opts
Add supplied model to the DocPad database
Parameters:
-
model
Object -
opts
Object
Returns:
the model
addModels
-
models
-
opts
Add the supplied collection of models to the DocPad database
Parameters:
-
models
Object -
opts
Object
Returns:
the models
attachModelEvents
-
model
Attach events to document models
Parameters:
-
model
Object
checkRequest
-
next
Check Request
Parameters:
-
next
Function
clean
-
opts
-
next
DocPad cleanup tasks next(err)
Parameters:
-
opts
Object -
next
Object
Returns:
description
compareVersion
()
private
Compare current DocPad version to the latest and print out the result to the console. Used at startup.
constructor
-
instanceConfig
-
next
Constructor method. Sets up the DocPad instance. next(err)
Parameters:
-
instanceConfig
Object -
next
Function
contextualizeFiles
-
[opts={}]
-
next
Contextualize files. Contextualizing is the process of adding layouts and awareness of other documents to our document. The contextualizeBefore and contextualizeAfter events are emitted here. next(err)
Parameters:
-
[opts={}]
Object optional -
next
Function
createDocument
-
[attrs={}]
-
[opts={}]
Create document model
Parameters:
-
[attrs={}]
Object optional -
[opts={}]
Object optional
Returns:
DocumentModel
createError
-
err
-
opts
Create an error object
Parameters:
-
err
Object -
opts
Object
Returns:
the error
createFile
-
[attrs={}]
-
[opts={}]
Create file model
Parameters:
-
[attrs={}]
Object optional -
[opts={}]
Object optional
Returns:
FileModel
createModel
-
[attrs={}]
-
[opts={}]
Creates either a file or document model. Ensures a duplicate model is not created and all required attributes are present and events attached
Parameters:
-
[attrs={}]
Object optional -
[opts={}]
Object optional
Returns:
the file or document model
createModels
-
models
-
opts
Create a collection of models from the supplied collection ensuring that the collection is suitable for adding to the DocPad database
Parameters:
-
models
Object -
opts
Object
Returns:
the models
createProgress
()
Object
private
Create the console progress bar. Progress only shown if the DocPad config 'progress' option is true, the DocPad config 'prompts' option is true and the log level is 6 (default)
Returns:
the progress object
createRegenerateTimer
()
private
Create the regeneration timer
destroy
-
opts
-
next
Destructor. Destroy the DocPad instance This is an action, and should be called as such E.g. docpad.action('destroy', next)
Parameters:
-
opts
Object -
next
Function
destroyBlocks
()
private
Destructor. Destroy all blocks
destroyCollection
-
value
Destroy a collection by collection name or key
Parameters:
-
value
String
Returns:
description
destroyCollections
()
private
Destructor. Destroy the DocPad project's collections.
destroyDatabase
()
private
Destructor. Destroy the DocPad database
destroyLoggers
()
private
Destructor. Destroy the caterpillar logger instances bound to DocPad
destroyPlugins
()
private
Destructor. Destroy plugins
destroyProgress
-
progress
Destructor. Destroy the progress object
Parameters:
-
progress
Object
Returns:
the progress object
destroyRegenerateTimer
()
private
Destructor. Destroy the regeneration timer.
destroyServer
()
private
Destructor. Close and destroy the node.js http server
destroyWatchers
()
private
Destructor. Destroy the watchers used by DocPad
eachBlock
-
fn
Apply the passed function to each block
Parameters:
-
fn
Function
eachCollection
-
fn
Apply the passed function to each collection
Parameters:
-
fn
Function
emitParallel
-
eventName
-
opts
-
next
Emit event, parallel
Parameters:
-
eventName
String -
opts
Object -
next
Function
emitSerial
-
eventName
-
opts
-
next
Emit event, serial
Parameters:
-
eventName
String -
opts
Object -
next
Function
error
-
err
-
[level='err']
Create an error (tracks it) and log it
Parameters:
-
err
Object -
[level='err']
Object optional
extendCollections
-
next
Extend collecitons. Create DocPad's standard (documents, files layouts) and special (generate, referencesOthers, hasLayout, html, stylesheet) collections. Set blocks next(err)
Parameters:
-
next
Function
fatal
-
err
Handle a fatal error
Parameters:
-
err
Object
fixNodePackageVersions
-
opts
Fix node package versions Combat to https://github.com/npm/npm/issues/4587#issuecomment-35370453 next(err)
Parameters:
-
opts
Object
generate
-
opts
-
next
Set off DocPad's generation process. The generated, populateCollectionsBefore, populateCollections, populateCollections generateBefore and generateAfter events are emitted here next(err)
Parameters:
-
opts
Object -
next
Function
getActionRunner
()
Object
Get the action runner instance bound to docpad
Returns:
the action runner instance
getBlock
-
name
-
[clone]
Get a block by block name. Optionally clone block.
Parameters:
-
name
String -
[clone]
Object optional
Returns:
block
getBlocks
()
Object
Get all blocks
Returns:
collection of blocks
getCollection
-
value
Get a collection by collection name or key
Parameters:
-
value
String
Returns:
collection
getCollections
()
Object
Get the DocPad project's collections
Returns:
the collections
getConfig
()
Object
Get the Configuration
Returns:
the DocPad configuration object
getConfigPath
-
opts
-
next
Get config paths and check that those paths exist next(err,path)
Parameters:
-
opts
Object -
next
Object
getDatabase
()
Description for getDatabase
getDatabaseSafe
()
Object
Safe method for retrieving the database by either returning the database itself or the temporary database cache
Returns:
getDebugging
()
Boolean
Are we debugging?
Returns:
getEnvironment
()
String
Get the DocPad environment, eg: development, production or static
Returns:
the environment
getEnvironments
()
Array
Get the environments
Returns:
array of environment strings
getErrorRunner
()
Object
Get the error runner instance
Returns:
the error runner instance
getEvents
()
Object
Get the list of available events
Returns:
string array of event names
getExchange
-
next
Get DocPad's exchange data Requires internet access next(err,exchange)
Parameters:
-
next
Function
getFile
-
query
-
sorting
-
paging
Get a single file based on a query
Parameters:
-
query
Object -
sorting
Object -
paging
Object
Returns:
a file
getFileAtPath
-
path
-
sorting
-
paging
Get a file at a relative or absolute path or url
Parameters:
-
path
String -
sorting
Object -
paging
Object
Returns:
a file
getFileById
-
id
-
[opts={}]
Get a file by its id
Parameters:
-
id
String -
[opts={}]
Object optional
Returns:
a file
getFileByRoute
-
url
-
next
Get a file by its route
Parameters:
-
url
String -
next
Object
getFileBySelector
-
selector
-
[opts={}]
Get a file by its selector
Parameters:
-
selector
Object -
[opts={}]
Object optional
Returns:
a file
getFileByUrl
-
url
-
[opts={}]
Get a file by its url
Parameters:
-
url
String -
[opts={}]
Object optional
Returns:
a file
getFiles
-
query
-
sorting
-
paging
Get all the files in the DocPad database (will use live collections)
Parameters:
-
query
Object -
sorting
Object -
paging
Object
Returns:
collection
getFilesAtPath
-
path
-
sorting
-
paging
Get files at a path
Parameters:
-
path
String -
sorting
Object -
paging
Object
Returns:
files
getHostname
()
String
Get the Hostname
Returns:
getIgnoreOpts
()
Array
Get the ignore options for the DocPad project
Returns:
string array of ignore options
getLocale
()
Object
Get the locale (language code and locale code)
Returns:
locale
getLogger
()
Object
Get the caterpillar logger instance bound to DocPad
Returns:
caterpillar logger
getLoggers
()
Object
Get all the caterpillar logger instances bound to DocPad
Returns:
collection of caterpillar loggers
getLogLevel
()
Number
Get the log level
Returns:
the log level
getPlugin
-
pluginName
Get a plugin by it's name
Parameters:
-
pluginName
Object
Returns:
a DocPad plugin
getPort
()
Number
Get the port that DocPad is listening on (eg 9778)
Returns:
the port number
getProcessPlatform
()
Object
Get the process platform
Returns:
getProcessVersion
()
String
Get the process version string
Returns:
getServer
-
[both=false]
Get the DocPad express.js server instance and, optionally, the node.js https server instance
Parameters:
-
[both=false]
Boolean optional
Returns:
getServerUrl
-
[opts={}]
Get address
Parameters:
-
[opts={}]
Object optional
Returns:
getSimpleServerUrl
-
[opts={}]
Get simple server URL (changes 0.0.0.0, ::, and ::1 to 127.0.0.1)
Parameters:
-
[opts={}]
Object optional
Returns:
getSkeletons
-
next
Get Skeletons Get all the available skeletons for us and their details next(err,skeletonsCollection)
Parameters:
-
next
Function
Returns:
DocPad skeleton collection
getTemplateData
-
userTemplateData
Get Complete Template Data
Parameters:
-
userTemplateData
Object
Returns:
templateData
getTrackRunner
()
Object
Get the track runner instance
Returns:
the track runner instance
getUrlPathname
-
url
Remove the query string from a url Pathname convention taken from document.location.pathname
Parameters:
-
url
String
Returns:
getVersion
()
Number
Get the DocPad version number
Returns:
getVersionString
()
String
Get the DocPad version string
Returns:
hasPlugins
()
Boolean
Check if we have any plugins
Returns:
identify
-
next
Identify DocPad user next(err)
Parameters:
-
next
Function
init
-
opts
-
next
Initialize the project directory with the basic skeleton.
Parameters:
-
opts
Object -
next
Object
Returns:
description
initGitRepo
-
opts
-
next
Initialise git repo next(err,results)
Parameters:
-
opts
Object -
next
Function
initInstall
-
opts
-
next
Initialize the skeleton install process next(err)
Parameters:
-
opts
Object -
next
Function
initNodeModules
-
opts
-
next
Init node modules next(err,results)
Parameters:
-
opts
Object -
next
Function
initSkeleton
-
skeletonModel
-
opts
-
next
Initialize a Skeleton into to a Directory next(err)
Parameters:
-
skeletonModel
Object -
opts
Object -
next
Function
inspector
-
obj
-
opts
Inspect. Converts object to JSON string. Wrapper around nodes util.inspect method. Can't use the inspect namespace as for some silly reason it destroys everything
Parameters:
-
obj
Object -
opts
Object
Returns:
JSON string of passed object
install
-
opts
-
next
Install a plugin next(err)
Parameters:
-
opts
Object -
next
Function
installNodeModule
-
names
-
opts
Install node module. Same as running 'npm install' through the command line next(err,result)
Parameters:
-
names
Array -
opts
Object
installSkeleton
-
skeletonModel
-
opts
-
next
Install a Skeleton into a Directory
Parameters:
-
skeletonModel
Object -
opts
Object -
next
Function
isIgnoredPath
-
path
-
[opts={}]
Is the supplied path ignored?
Parameters:
-
path
String -
[opts={}]
Object optional
Returns:
load
-
instanceConfig
-
next
Load the various configuration files from the file system. Set the instanceConfig. next(err,config)
Parameters:
-
instanceConfig
Object -
next
Function
loadAndRenderDocument
-
document
-
opts
-
next
Load and render a document next(err,document)
Parameters:
-
document
Object -
opts
Object -
next
Function
loadConfigPath
-
opts
-
next
Load the configuration from a file path passed as one of the options (opts.configPath) or from DocPad's configPaths next(err,parsedData)
Parameters:
-
opts
Object -
next
Function
loadConfigUrl
-
configUrl
-
next
Load a configuration url next(err,parsedData)
Parameters:
-
configUrl
String -
next
Function
loadDocument
-
document
-
opts
-
next
Load a document next(err,document)
Parameters:
-
document
Object -
opts
Object -
next
Function
loadedPlugin
-
pluginName
-
next
Checks if a plugin was loaded succesfully
Parameters:
-
pluginName
String -
next
Function
loadLocale
-
code
Load the locale
Parameters:
-
code
String
Returns:
locale
loadPlugin
-
fileFullPath
-
_next
Load a plugin from its full file path _next(err)
Parameters:
-
fileFullPath
String -
_next
Function
Returns:
description
loadPlugins
-
next
Load plugins from the file system next(err)
Parameters:
-
next
Function
loadPluginsIn
-
pluginsPath
-
next
Load plugins from a directory path next(err)
Parameters:
-
pluginsPath
String -
next
Function
logError
-
err
Log an error
Parameters:
-
err
Object
mergeConfigurations
-
configPackages
-
configsToMerge
Performs the merging of the passed configuration objects
Parameters:
-
configPackages
Object -
configsToMerge
Object
notify
-
message
-
[opts={}]
Send a notify event to plugins (like growl)
Parameters:
-
message
String -
[opts={}]
Object optional
notifyError
-
err
Notify error
Parameters:
-
err
Object
parseDirectory
-
[opts={}]
-
next
Parse a directory and return a files collection next(err, files)
Parameters:
-
[opts={}]
Object optional -
next
Object
Returns:
FilesCollection
parseDocumentDirectory
-
[opts={}]
-
next
Parse the documents directory
Parameters:
-
[opts={}]
Object optional -
next
Function
Returns:
FilesCollection of documents
parseFileDirectory
-
[opts={}]
-
next
Parse the files directory
Parameters:
-
[opts={}]
Object optional -
next
Function
Returns:
FilesCollection
ready
-
opts
-
next
DocPad is ready. Peforms the tasks needed after DocPad construction and DocPad has loaded. Triggers the docpadReady event. next(err,docpadInstance)
Parameters:
-
opts
Object -
next
Function
render
-
opts
-
next
Render action next(err,document,result)
Parameters:
-
opts
Object -
next
Function
renderData
-
content
-
opts
-
next
Render the passed content data as a document. Required option, filename (opts.filename) next(err,result)
Parameters:
-
content
String -
opts
Object -
next
Function
renderDocument
-
document
-
opts
-
next
Render a document next(err,result)
Parameters:
-
document
Object -
opts
Object -
next
Object
renderFiles
-
[opts={}]
-
next
Render the DocPad project's files. The renderCollectionBefore, renderCollectionAfter, renderBefore, renderAfter events are all emitted here. next(err)
Parameters:
-
[opts={}]
Object optional -
next
Function
renderPath
-
path
-
opts
-
next
Render a document at a file path next(err,result)
Parameters:
-
path
String -
opts
Object -
next
Function
renderText
-
text
-
opts
-
next
Render the passed text data as a document. Required option, filename (opts.filename) next(err,result)
Parameters:
-
text
String -
opts
Object -
next
Function
resetCollections
-
opts
-
next
Reset collections. Perform a complete clean of our collections next(err)
Parameters:
-
opts
Object -
next
Function
run
-
opts
-
next
Run an action
Parameters:
-
opts
Object -
next
Function
scandir
-
[opts={}]
Scan directory
Parameters:
-
[opts={}]
Object optional
selectSkeleton
-
opts
-
next
Select a Skeleton next(err,skeletonModel)
Parameters:
-
opts
Object -
next
Function
serveDocument
-
opts
-
next
Serve a document
Parameters:
-
opts
Object -
next
Function
server
-
opts
-
next
Configure and start up the DocPad web server. Http and express server is created, extended with middleware, started up and begins listening. The events serverBefore, serverExtend and serverAfter emitted here.
Parameters:
-
opts
Object -
next
Function
serverMiddleware404
-
req
-
res
-
next
Server Middleware: 404
Parameters:
-
req
Object -
res
Object -
next
Object
serverMiddleware500
-
err
-
req
-
res
-
next
Server Middleware: 500
Parameters:
-
err
Object -
req
Object -
res
Object -
next
Function
serverMiddlewareHeader
-
req
-
res
-
next
Server Middleware: Header
Parameters:
-
req
Object -
res
Object -
next
Object
serverMiddlewareRouter
-
req
-
res
-
next
Server Middleware: Router
Parameters:
-
req
Object -
res
Object -
next
Function
setBlock
-
name
-
value
Set a block by name and value
Parameters:
-
name
String -
value
Object
setBlocks
-
blocks
Set all blocks
Parameters:
-
blocks
Object
setCollection
-
name
-
collection
Set a name for a collection A collection can have multiple names
Parameters:
-
name
String -
collection
Object
setCollections
()
Set the DocPad project's collections
setConfig
-
instanceConfig
-
next
Set the DocPad configuration object. Performs a number of tasks, including merging the pass instanceConfig with DocPad's other config objects. next(err,config)
Parameters:
-
instanceConfig
Object -
next
Object
setInstanceConfig
-
instanceConfig
Set the instance configuration by merging the properties of the passed object with the existing DocPad instanceConfig object
Parameters:
-
instanceConfig
Object
setLoggers
-
loggers
Sets the caterpillar logger instances bound to DocPad
Parameters:
-
loggers
Object
Returns:
logger instances bound to DocPad
setLogLevel
-
level
Set the log level
Parameters:
-
level
Number
setServer
-
servers
Set the express.js server and node.js http server to bind to DocPad
Parameters:
-
servers
Object
skeleton
-
opts
-
next
Initialize the project directory with the basic skeleton.
Parameters:
-
opts
Object -
next
Function
skeletonEmpty
-
path
-
next
Skeleton Empty?
Parameters:
-
path
Object -
next
Function
subscribe
-
next
Subscribe to the DocPad email list. next(err)
Parameters:
-
next
Function
track
-
name
-
[things={}]
-
next
Track next(err)
Parameters:
-
name
String -
[things={}]
Object optional -
next
Function
trackError
-
err
Track an error in the background
Parameters:
-
err
Object
uninstall
-
opts
-
next
Uninstall a plugin. next(err)
Parameters:
-
opts
Object -
next
Function
uninstallNodeModule
-
names
-
opts
Uninstall node module. Same as running 'npm uninstall' through the command line next(err,result)
Parameters:
-
names
Array -
opts
Object
update
-
opts
-
next
Update the local DocPad and plugin dependencies next(err)
Parameters:
-
opts
Object -
next
Object
updateUserConfig
-
[data={}]
-
next
Update user configuration with the passed data
Parameters:
-
[data={}]
Object optional -
next
Function
upgrade
-
opts
-
next
Update global NPM and DocPad next(err)
Parameters:
-
opts
Object -
next
Object
Returns:
description
useSkeleton
-
skeletonModel
-
opts
-
next
Use a Skeleton next(err)
Parameters:
-
skeletonModel
Object -
opts
Object -
next
Object
Returns:
description
warn
-
message
-
err
Log an error of level 'warn'
Parameters:
-
message
String -
err
Object
Returns:
description
watch
-
opts
-
next
Start up file watchers used by DocPad
Parameters:
-
opts
Object -
next
Function
watchdir
-
[opts={}]
Watch Directory
Parameters:
-
[opts={}]
Object optional
Returns:
the watcher
writeFiles
-
[opts={}]
-
next
Write rendered files to the DocPad out directory. The writeBefore and writeAfter events are emitted here. next(err)
Parameters:
-
[opts={}]
Object optional -
next
Function
Properties
actionRunnerInstance
Object
private
The action runner instance bound to docpad
BasePlugin
Object
Base class for all DocPad plugins https://github.com/docpad/docpad/blob/master/src/lib/plugin.coffee
blocks
Object
private
Blocks
Collection
Object
Collection class Extension of the Backbone Collection class https://github.com/docpad/docpad/blob/master/src/lib/base.coffee http://backbonejs.org/#Collection
collections
Object
private
The DocPad collections
config
Object
private
Merged Configuration Merged in the order of:
- initialConfig
- userConfig
- websiteConfig
- instanceConfig
- environmentConfig Use getConfig to retrieve this value
corePath
String
The DocPad directory
database
Object
private
QueryEngine collection
databaseTempCache
Object
Description for databaseTempCache
debugLogPath
String
The DocPad debug log path (docpad-debug.log)
DocumentModel
Object
Document Model class Extension of the File Model class https://github.com/docpad/docpad/blob/master/src/lib/models/document.coffee
ElementsCollection
Object
Collection of elements in a DocPad project Extension of the Collection class https://github.com/docpad/docpad/blob/master/src/lib/collections/elements.coffee
errorRunnerInstance
Object
The error runner instance bound to DocPad
exchange
Object
A listing of all the available extensions for DocPad
FileModel
Object
File Model class Extension of the Model class https://github.com/docpad/docpad/blob/master/src/lib/models/file.coffee
filesByOutPath
Object
private
Files by Out Path. Used to speed up conflict detection. Do not use for anything else
filesBySelector
Object
private
Files by Selector. Used to speed up fetching
filesByUrl
Object
private
Files by url. Used to speed up fetching
FilesCollection
Object
Collection of files in a DocPad project Extension of the QueryCollection class https://github.com/docpad/docpad/blob/master/src/lib/collections/files.coffee
generated
Object
private
Has DocPad done at least one generation? True once the first generation has occured.
generateEnded
Boolean
private
Has DocPad's generation process ended?
generateStarted
Boolean
private
Has DocPad's generation process started?
generating
Boolean
private
Is DocPad currently generating?
initialConfig
Object
private
Initial Configuration. The default docpadConfig settings that can be overridden in a project's docpad.coffee file. Merged into the config property
initialTemplateData
Object
private
Description for initialTemplateData
instanceConfig
Object
private
Instance Configuration
libPath
String
private
The DocPad library directory
loadedPlugins
Object
Loaded plugins indexed by name
locale
Object
private
Determined locale
localePath
String
The DocPad locale path
log
Object
Log arguments
Sub-properties:
-
args...
Mixed
loggerInstances
Object
private
Internal property. The caterpillar logger instances bound to DocPad
mainPath
String
The main DocPad file
MetaCollection
Object
Collection of metadata in a DocPad project Extension of the ElementsCollection class https://github.com/docpad/docpad/blob/master/src/lib/collections/meta.coffee
Model
Object
Model class Extension of the Backbone Model class http://backbonejs.org/#Model https://github.com/docpad/docpad/blob/master/src/lib/base.coffee
packagePath
String
The DocPad package.json path
PluginLoader
Object
Plugin Loader class https://github.com/docpad/docpad/blob/master/src/lib/plugin-loader.coffee Loads the DocPad plugins from the file system into a DocPad project
pluginsTemplateData
Object
private
Plugin's Extended Template Data
pluginVersion
String
The plugin version requirements
QueryCollection
Object
QueryCollection class Extension of the Query Engine QueryCollection class https://github.com/docpad/docpad/blob/master/src/lib/base.coffee https://github.com/bevry/query-engine/blob/master/src/documents/lib/query-engine.js.coffee
regenerateTimer
Object
private
Regenerate Timer When config.regenerateEvery is set to a value, we create a timer here
ScriptsCollection
Object
Collection of JS script files in a DocPad project Extension of the ElementsCollection class https://github.com/docpad/docpad/blob/master/src/lib/collections/scripts.coffee
serverHttp
Object
private
The Node.js http server instance bound to DocPad https://nodejs.org/api/http.html
skeletonsCollection
Object
private
Skeletons Collection
slowPlugins
Object
Plugins that are loading really slow
string array of event names
Array
private
Event Listing. String array of event names. Whenever an event is created, it must be applied here to be available to plugins and configuration files https://github.com/bevry/docpad/wiki/Events
string constant
String
private
Hash Key The key that we use to hash some data before sending it to our statistic server
StylesCollection
Object
Collection of CSS style files in a DocPad project Extension of the ElementsCollection class https://github.com/docpad/docpad/blob/master/src/lib/collections/styles.coffee
trackRunnerInstance
Object
private
The track runner instance bound to DocPad
userConfig
Object
private
User Configuraiton Merged into the config property
userConfigPath
String
The User's configuration path (.docpad.cson)
version
Number
private
DocPad's version number
watchers
Array
private
Array of file watchers
websiteConfig
Object
private
Website Configuration Merged into the config property
websitePackageConfig
Object
private
Website Package Configuration