This module is used to embed resource bundles for use by widgets and applications.
Typical usage looks like:
import Dingo.ResourceBundle myResourceDirectory :: ResourceDirectory myResourceDirectory = $(embedDir "bundles/my-resources") myResourceBundle :: ResourceBundle myResourceBundle = makeResourceBundle myResourceDirecory
You can then use myResourceBundle
as a resource bundle in
a widget or supply it in the application settings when starting
the Dingo server.
- data ResourceBundle
- type ResourceDirectory = [(String, ByteString)]
- makeResourceBundle :: ResourceDirectory -> ResourceBundle
- embedDir :: FilePath -> Q Exp
Documentation
data ResourceBundle Source
Resource bundle data structure.
type ResourceDirectory = [(String, ByteString)]Source
Type alias for convience for using embedDir
.
makeResourceBundle :: ResourceDirectory -> ResourceBundleSource
Make a resource bundle from an embedded directory structure returned by embedDir
.