serversession/examples/serversession-example-yesod-persistent/Settings/StaticFiles.hs
Felipe Lessa 23584a9c47 Add new Yesod+Persistent example, currently just "yesod init".
Separating "yesod init" commit from others in order to be clearer what
changes were made to the scaffold.

[ci skip]
2015-06-01 13:01:23 -03:00

19 lines
694 B
Haskell

module Settings.StaticFiles where
import Settings (appStaticDir, compileTimeAppSettings)
import Yesod.Static (staticFiles)
-- This generates easy references to files in the static directory at compile time,
-- giving you compile-time verification that referenced files exist.
-- Warning: any files added to your static directory during run-time can't be
-- accessed this way. You'll have to use their FilePath or URL to access them.
--
-- For example, to refer to @static/js/script.js@ via an identifier, you'd use:
--
-- js_script_js
--
-- If the identifier is not available, you may use:
--
-- StaticFile ["js", "script.js"] []
staticFiles (appStaticDir compileTimeAppSettings)