úÎÙÓÙ/      !"#$%&'()*+,-.None SAn embedded generator is executed at compile time to produce the entries to embed. @A single resource embedded into the executable at compile time. >This data type is a settings type. For more information, see   +http://www.yesodweb.com/book/settings-types. =An optional haskell name. If the name is present, a variable  of type Route  with the = given name will be created which points to this resource. )The location to serve the resource from. The mime type of the resource. If the development argument to  is False, H then at compile time this action will be executed to load the content. 7 During development, this action will not be executed. 3This must be a template haskell expression of type IO /.  If the development argument to  is True, O this action is executed on every request to compute the content. Most of the  time,  and  should be the same action but > occasionally you might want additional processing inside the   function like javascript/>css minification to only happen when building for production. ;Occasionally, during development an entry needs extra files/resources available V that are not present during production (for example, image files that are embedded T into the CSS at production but left unembedded during development). If present,  ebDevelExtraFiles/ must be a template haskell expression of type  [] -> IO (Maybe (0, /)). That is, a function P taking as input the list of path pieces and optionally returning a mime type  and content. aA location is a relative path within the static subsite at which resource(s) are made available. b The location can include slashes to simulate directories but must not start or end with a slash. 1 When using 2, you must fill in at least . 3 1   3 1None EEmbed a single file. Equivalent to passing the same string twice to  . QEmbed a single file at a given location within the static subsite and generate a , route variable based on the location via . The FilePath must be a relative * path to the directory in which you run  cabal build(. During development, the file located d at this filepath will be reloaded on every request. When compiling for production, the contents X of the file will be embedded into the executable and so the file does not need to be * distributed along with the executable. 4*List all files recursively in a directory 8Embed all files in a directory into the static subsite. :Equivalent to passing the empty string as the location to  , L so the directory path itself is not part of the resource locations (and so 7 also not part of the generated route variable names). NEmbed all files in a directory to a given location within the static subsite. !The directory tree rooted at the 5- (which must be relative to the directory in  which you run  cabal build3) is embedded into the static subsite at the given N location. Also, route variables will be created based on the final location , of each file. For example, if a directory "static" contains the files  css/bootstrap.css  js/ jquery.js  js/ bootstrap.js then  embedDirAt " somefolder" "static" will  Make the file static/css/ bootstrap.css available at the location   somefolder/css/ bootstrap.css) within the static subsite and similarly  for the other two files.  Create variables somefolder_css_bootstrap_css, somefolder_js_jquery_js,  somefolder_js_bootstrap_js all of type Route EmbeddedStatic. J During development, the files will be reloaded on every request. During O production, the contents of all files will be embedded into the executable. L During development, files that are added to the directory while the server L is running will not be detected. You need to recompile the module which  contains the call to mkEmbeddedStatic%. This will also generate new route  variables for the new files. QConcatinate a list of files and embed it at the location. Equivalent to passing return to  . *Concatinate a list of files into a single /., run the resulting content through the given g function, embed it at the given location, and create a haskell variable name for the route based on  the location. bThe processing function is only run when compiling for production, and the processing function is b executed at compile time. During development, on every request the files listed are reloaded, ` concatenated, and served as a single resource at the given location without being processed. Convienient rexport of 6$ with a type signature to work with . Use  #https://github.com/mishoo/UglifyJS2 UglifyJS2 to compress javascript.  Assumes uglifyjs) is located in the path and uses options ["-m", "-c"] , to both mangle and compress and the option "-" to cause uglifyjs to read from  standard input. Use  #http://yui.github.io/yuicompressor/YUI Compressor to compress javascript.  Assumes a script  yuicompressor0 is located in the path. If not, you can still  use something like L compressTool "java" ["-jar", "/path/to/yuicompressor.jar", "--type", "js"] Use  #http://yui.github.io/yuicompressor/YUI Compressor to compress CSS.  Assumes a script  yuicompressor is located in the path. Use  /https://developers.google.com/closure/compiler/Closure to compress 9 javascript using the default options. Assumes a script closure is located in + the path. If not, you can still run using 7 compressTool "java" ["-jar", "/path/to/compiler.jar"] FHelper to convert a process into a compression function. The process R should be set up to take input from standard input and write to standard output. RTry a list of processing functions (like the compressions above) one by one until S one succeeds (does not raise an exception). Once a processing function succeeds, P none of the remaining functions are used. If none succeeds, the input is just @ returned unprocessed. This is helpful if you are distributing U code on hackage and do not know what compressors the user will have installed. You F can list several and they will be tried in order until one succeeds. MClean up a path to make it a valid haskell name by replacing all non-letters S and non-numbers by underscores. In addition, if the path starts with a capital / letter or number add an initial underscore.  4The directory to search #The prefix to add to the filenames program options    4 None8Data type for holding all settings for combining files. >This data type is a settings type. For more information, see:  +http://www.yesodweb.com/book/settings-types  Since 1.2.0 #File path containing static files. Default: static  Since 1.2.0 .Post processing to be performed on CSS files. Default: Use Lucius to minify.  Since 1.2.0 5Post processing to be performed on Javascript files. Default: Pass-through.  Since 1.2.0 -Pre-processing to be performed on CSS files. #Default: convert all occurences of static to ../  Since 1.2.0 4Pre-processing to be performed on Javascript files. Default: Pass-through.  Since 1.2.0 &Subfolder to put combined files into. Default: combined  Since 1.2.0 0Type used for the subsite with static contents. "Produce a default value of   for a given file  folder. =Does not have index files or directory listings. The static  files' contents must not" change, however new files can be  added. #Same as "-, but does not assumes that the files do not > change and checks their modification time whenever a request  is made. $ Produce a  + based on embedding all of the static files' contents in the  executable at compile time. You should use Yesod.EmbeddedStatic$ instead, it is much more powerful. )Nota Bene: if you replace the scaffolded " call in Settings/StaticFiles.hs S you will need to change the scaffolded addStaticContent. Otherwise, some of your  assets will be 404'Bed. This is because by default yesod will generate compile those  assets to static/tmp which for "* is fine since they are served out of the > directory itself. With embedded static, that will not work.  You can easily change addStaticContent to _ _ _ -> return Nothing as a workaround. R This will cause yesod to embed those assets into the generated HTML file itself. %<Template Haskell function that automatically creates routes  for all of your static files. For example, if you used   staticFiles "static/" and you had files "static/ style.css" and  "static/js/ script.js", then the following top-level  definitions would be created:  0 style_css = StaticRoute ["style.css"] [] 0 js_script_js = StaticRoute ["js/script.js"] [] Note that dots (. ), dashes (-) and slashes (/) are  replaced by underscores (_) to create valid Haskell  identifiers. &Same as %&, but takes an explicit list of files > to create identifiers for. The files path given are relative = to the static folder. For example, to create routes for the  files "static/js/ jquery.js" and  "static/css/ normalize.css", you would use:  H staticFilesList \"static\" [\"js\/jquery.js\", \"css\/normalize.css\"] ?This can be useful when you have a very large number of static > files, but only need to refer to a few of them from Haskell. 'Same as % , but doesn't append an ETag to the  query string. Using ', will speed up the compilation, since there  won'5t be any need for hashing files during compile-time. ; However, since the ETag ceases to be part of the URL, the    subsite won')t be able to set the expire date too far : on the future. Browsers still will be able to cache the  contents, however they'(ll need send a request to the server to " see if their copy is up-to-date. )<Combine multiple CSS files together. Common usage would be: EcombineStylesheets' development def 'StaticR [style1_css, style2_css]Where  development9 is a variable in your site indicated whether you are in ! development or production mode.  Since 1.2.0 *;Combine multiple JS files together. Common usage would be: AcombineScripts' development def 'StaticR [script1_js, script2_js]Where  development9 is a variable in your site indicated whether you are in ! development or production mode.  Since 1.2.0 )789: !"#$;<%&'=>?@ABstatic directory route constructor  StaticRoute  append checksum query parameter Cstatic directory (list of files to create identifiers for route constructor  StaticRoute  append checksum query parameter D(EFfiles to combine GH))development? if so, perform no combining $Static route constructor name, e.g. 'StaticR files to combine *)development? if so, perform no combining $Static route constructor name, e.g. 'StaticR files to combine IJKLMN !O"#$%&'()* !"#)*%&'($78:9 !"#$;<%&'=>?@ABCD(EFGH)*IJKL None P The type of Q R3At compile time, one of these is created for every  created by E the generators. The cLink is a template haskell expression of type Route EmbeddedStatic. S9Optional haskell name to create a variable for the route T-The entry to be embedded into the executable UThe route for this entry +1The subsite for the embedded static file server. V Create a R? for development mode, reloading the content on every request. W Create a RM for production mode, hashing and embedding the content into the executable. X8Helper to create the development application at runtime Y>Helper for embedStaticContent and embedLicensedStaticContent. ZSCreate a wai-app-static settings based on the IORef inside the EmbeddedStaic site. PR[STU+\]^_VW`XYZabPR[STU+\]^cdVWXYZ PR[STU+\]^_VW`XYZabNone,+Construct a route to an embedded resource. e6Create the haskell variable for the link to the entry - Creates an +5 by running, at compile time, a list of generators. I Each generator produces a list of entries to embed into the executable. NThis template haskell splice creates a variable binding holding the resulting  +> and in addition creates variable bindings for all the routes L produced by the generators. For example, if a directory called static has  the following contents:  js/ jquery.js  css/bootstrap.css  img/ logo.png then a call to   #ifdef DEVELOPMENT  #define DEV_BOOL True  #else  #define DEV_BOOL False  #endif : mkEmbeddedStatic DEV_BOOL "myStatic" [embedDir "static"] will produce variables  myStatic :: EmbeddedStatic & js_jquery_js :: Route EmbeddedStatic + css_bootstrap_css :: Route EmbeddedStatic & img_logo_png :: Route EmbeddedStatic . Use this for Q0 to have the widget static content be served by . the embedded static subsite. For example,  import Yesod  import Yesod.EmbeddedStatic  import Text.Jasmine (minifym)  9 data MySite = { ..., getStatic :: EmbeddedStatic, ... }   mkYesod "MySite" [parseRoutes|  ... * /static StaticR EmbeddedStatic getStatic  ...  |]   instance Yesod MySite where  ... B addStaticContent = embedStaticContent getStatic StaticR mini = where mini = if development then Right else minifym  ... ,e- development? variable name for the created + the generators (see Yesod.EmbeddedStatic.Generators) .;How to retrieve the embedded static subsite from your site (how to convert an embedded static route javascript minifier f +,-.+,-.,e-.fg    !"#$%&'()*+,,-./012345 6789:;<=>?@ABCDEFGH$IJKLMNOPQRSTUVWXYZ[\]^_`^ab+ c^de f g h i j k l m n f  o p q r s t u vwxyyesod-static-1.2.1 Yesod.StaticYesod.EmbeddedStatic.TypesYesod.EmbeddedStatic.GeneratorsYesod.EmbeddedStaticEmbeddedStaticmkEmbeddedStaticTTextYesod.EmbeddedStatic.Internalyesod-routes-1.2.0.1Yesod.Routes.ClassRoute GeneratorEntry ebHaskellName ebLocation ebMimeTypeebProductionContent ebDevelReloadebDevelExtraFilesLocation embedFile embedFileAtembedDir embedDirAt concatFilesconcatFilesWithjasmineuglifyJs yuiJavascriptyuiCSS closureJs compressTooltryCompressTools pathToNameCombineSettings csStaticDircsCssPostProcesscsJsPostProcesscsCssPreProcesscsJsPreProcesscsCombinedFolder StaticRouteStaticstatic staticDevelembed staticFilesstaticFilesList publicFiles base64md5combineStylesheets'combineScripts'embeddedResourceRembedStaticContentbytestring-0.10.0.2Data.ByteString.Lazy.Internal ByteStringmime-types-0.1.0.3 Network.MimeMimeType$fDefaultEntrydata-default-class-0.0.1Data.Default.ClassdefgetRecursiveContentsbaseGHC.IOFilePathhjsmin-0.1.4.3 Text.Jasmineminifym CombineTypeCSSJS notHiddengetFileListPieces mkHashMappathFromRawPiecescachedETagLookupDevelcachedETagLookup mkStaticFilesmkStaticFiles'mkStaticFilesList base64md5Filebase64combineStatics' errorIntro liftRoutes$fDefaultCombineSettings$fYesodSubDispatchStaticm$fParseRouteStatic$fRenderRouteStaticyesod-core-1.2.5Yesod.Core.Internal.LiteApp LiteAppRouteYesod.Core.TypesWaiSubsiteRouteAddStaticContentYesod.Core.Class.YesodaddStaticContent ComputedEntry cHaskellNamecStEntrycLinkdevEmbed prodEmbeddevelAppstaticContentHelperwidgetSettingsstApp widgetFilesmkStrtryExtraDevelFiles$fParseRouteEmbeddedStatic$fRenderRouteEmbeddedStaticEmbeddedWidgetREmbeddedResourceRmkRoute($fYesodSubDispatchEmbeddedStaticHandlerT