Theme Class
Description
This module manages all files in the theme folder.
Constructor
Theme
This module manages all files in the theme folder.
Methods
_dispatch
(type, path, [callback]) async private_loadFileList
(callback) async privateaddProcessor
(pattern, fn)Adds a processor to the box.
Parameters
-
pattern
RegExp | String
The path pattern of the processor. See Box.Pattern for more info.
-
fn
Function
The processor function.
generate
([options], [callback]) asyncgetView
(path) Theme.Viewprocess
([files], [callback]) asyncunwatch
Stops watching.
watch
Starts watching.
Properties
Box.Pattern
staticSee Box.Pattern
base
Base path.
config
Theme configuration.
i18n
The i18n instance of the theme.
isProcessing
privateIndicates if the box is processing.
processingFiles
privateProcessing files.
processors
Processor collection.
views
The view collection of the theme.
watcher
A instance of watcher.