úÎīŅčĮ4      !"#$%&'()*+,-./0123None RAn 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.HAn optional haskell name. If the name is present, a variable of type Route F 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, then at compile time this action will be executed to load the content. During development, this action will not be executed.3This must be a template haskell expression of type IO 4". If the development argument to ` is True, 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 X function like javascript/css minification to only happen when building for production.ũOccasionally, during development an entry needs extra files/resources available that are not present during production (for example, image files that are embedded into the CSS at production but left unembedded during development). If present, ebDevelExtraFiles2 must be a template haskell expression of type [ ] -> IO (Maybe (5, 4))v. That is, a function taking as input the list of path pieces and optionally returning a mime type and content.ÂA location is a relative path within the static subsite at which resource(s) are made available. The location can include slashes to simulate directories but must not start or end with a slash.6 When using 7, you must fill in at least . 86 86NoneM EEmbed a single file. Equivalent to passing the same string twice to  . }Embed 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 at this filepath will be reloaded on every request. When compiling for production, the contents of the file will be embedded into the executable and so the file does not need to be distributed along with the executable.9)List all files recursively in a directory 7Embed all files in a directory into the static subsite.:Equivalent to passing the empty string as the location to  „, so the directory path itself is not part of the resource locations (and so also not part of the generated route variable names). MEmbed all files in a directory to a given location within the static subsite.!The directory tree rooted at the :< (which must be relative to the directory in which you run  cabal buildČ) is embedded into the static subsite at the given location. Also, route variables will be created based on the final location of each file. For example, if a directory "static" contains the filescss/bootstrap.css js/jquery.jsjs/bootstrap.jsthen  embedDirAt "somefolder" "static" willMake the file static/css/bootstrap.css available at the location somefolder/css/bootstrap.cssD 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.—During development, the files will be reloaded on every request. During production, the contents of all files will be embedded into the executable.¯During development, files that are added to the directory while the server is running will not be detected. You need to recompile the module which contains the call to mkEmbeddedStaticD. 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 4Ĩ, run the resulting content through the given function, embed it at the given location, and create a haskell variable name for the route based on the location.˙#The processing function is only run when compiling for production, and the processing function is 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 ;$ 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  yuicompressorC is located in the path. If not, you can still use something like JcompressTool "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/ClosureF to compress javascript using the default options. Assumes a script closure9 is located in the path. If not, you can still run using 5compressTool "java" ["-jar", "/path/to/compiler.jar"]—Helper to convert a process into a compression function. The process should be set up to take input from standard input and write to standard output.˙ĪTry a list of processing functions (like the compressions above) one by one until one succeeds (does not raise an exception). Once a processing function succeeds, none of the remaining functions are used. If none succeeds, the input is just returned unprocessed. This is helpful if you are distributing code on hackage and do not know what compressors the user will have installed. You can list several and they will be tried in order until one succeeds.ÎClean up a path to make it a valid haskell name by replacing all non-letters and non-numbers by underscores. In addition, if the path starts with a capital letter or number add an initial underscore. 9The directory to search"The prefix to add to the filenames programoptions   9 None 246=K7Data 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: Pass-through. Since 1.2.04Post 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.03Pre-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 /Type used for the subsite with static contents."Produce a default value of   for a given file folder.NDoes not have index files or directory listings. The static files' contents must not) change, however new files can be added.#Same as "t, but does not assumes that the files do not change and checks their modification time whenever a request is made.$ Produce a  Y 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 you will need to change the scaffolded addStaticContent. Otherwise, some of your assets will be 404'ed. 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 Nothingc as a workaround. This will cause yesod to embed those assets into the generated HTML file itself.%ZTemplate 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: `style_css = StaticRoute ["style.css"] [] 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: FstaticFilesList \"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 %2, but doesn't append an ETag to the query string.Using 'ĸ will speed up the compilation, since there won't 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  developmentY 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  developmentY is a variable in your site indicated whether you are in development or production mode. Since 1.2.0+<=>? !@"#$AB%&'CDEFGHstatic directoryroute constructor  StaticRouteappend checksum query parameterIstatic directory'list of files to create identifiers forroute constructor  StaticRouteappend checksum query parameterJ(KLfiles to combineMN)(development? if so, perform no combining,Static route constructor name, e.g. 'StaticRfiles to combine*(development? if so, perform no combining,Static route constructor name, e.g. 'StaticRfiles to combineOPQRSTU !@"#$%&'()* !"#)*%&'($<=?> !"#$AB%&'CDEFGHIJ(KLMN)*OPQSR@ None =EK V The type of WX3At compile time, one of these is created for every Q created by the generators. The cLink is a template haskell expression of type Route EmbeddedStatic.Y8Optional haskell name to create a variable for the routeZ,The entry to be embedded into the executable[The route for this entry+0The subsite for the embedded static file server.\ Create a X> for development mode, reloading the content on every request.] Create a XL for production mode, hashing and embedding the content into the executable.^7Helper to create the development application at runtime_=Helper for embedStaticContent and embedLicensedStaticContent.`RCreate a wai-app-static settings based on the IORef inside the EmbeddedStaic site.VXaYZ[+bcdefg\]h^_`ijkVXaYZ[+bcdef\]^_` VXaYZ[+bcdg\]h^_`ikjfeNone 2346M,*Construct a route to an embedded resource.l5Create the haskell variable for the link to the entry- Creates an +} by running, at compile time, a list of generators. Each generator produces a list of entries to embed into the executable.OThis template haskell splice creates a variable binding holding the resulting +ĸ and in addition creates variable bindings for all the routes produced by the generators. For example, if a directory called static has the following contents: js/jquery.jscss/bootstrap.css img/logo.pngthen 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 W] to have the widget static content be served by the embedded static subsite. For example, ˙}import Yesod import Yesod.EmbeddedStatic import Text.Jasmine (minifym) data MySite = { ..., getStatic :: EmbeddedStatic, ... } mkYesod "MySite" [parseRoutes| ... /static StaticR EmbeddedStatic getStatic ... |] instance Yesod MySite where ... addStaticContent = embedStaticContent getStatic StaticR mini where mini = if development then Right else minifym ...,l- 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 routejavascript minifierm +,-.+,-.,l-.m NoneBEnTIf you tack on additional CSS post-processing filters, they use this as an argument.oThe parsed CSSpoIn the parsed CSS, this will be an image reference that we want to replace. the contents will be the filepath.qParse the filename out of url(r)sMCheck if a given CSS attribute is a background image referencing a local filet,Load an image map from the images in the CSSu!Create the CSS during developmentv.Serve the extra image files during developmentnwxyzo{p|q}s~€‚ƒt„… a filter to be run on production=The location the CSS file should appear in the static subsitePath to the CSS file.†‡ˆ‰uvnwxyzo{p|q}s~€‚ƒt„…†‡ˆ‰uvnwxyzo{p|q}s~€‚ƒt„…†‡ˆ‰uvNone/Anchors relative CSS image urls1/Equivalent to passing the same string twice to 2.2Equivalent to passing return to 3.3)Automatically make relative urls absolute$During development, leave CSS as is.˙HWhen CSS is organized into a directory structure, it will work properly for individual requests for each file. During production, we want to combine and minify CSS as much as possible. The combination process combines files from different directories, messing up relative urls. This pre-processor makes relative urls absolute/Anchor relative urls to here0Anchor relative urls to here123=The location the CSS file should appear in the static subsitePath to the CSS file.8Another filter function run after this one (for example return . yuiCSS . cssContent2) or other CSS filter that runs after this filter./0123123/0/0123Š   !"#$%&'()*+,-../01234567 89:;<=>?@ABCDEFGH IJKLMNO&PQR-STUVWXYZ[\]^_`abcdefghfij kflm n o p q r s t u v n  w x y z { | } ~ € ‚ ƒ „ …†‡ˆ ‰ Š ‹ Œ ‚  Ž   „ ‘ ’ “ ” • – — ˜ ™ š › œ žyesod-static-1.2.3Yesod.EmbeddedStatic.TypesYesod.EmbeddedStatic.Generators Yesod.StaticYesod.EmbeddedStatic$Yesod.EmbeddedStatic.Css.AbsoluteUrlEmbeddedStaticmkEmbeddedStaticTTextYesod.EmbeddedStatic.InternalYesod.EmbeddedStatic.Css.Util GeneratorEntry ebHaskellName ebLocation ebMimeTypeebProductionContent ebDevelReloadebDevelExtraFilesLocation embedFile embedFileAtembedDir embedDirAt concatFilesconcatFilesWithjasmineuglifyJs yuiJavascriptyuiCSS closureJs compressTooltryCompressTools pathToNameyesod-routes-1.2.0.6Yesod.Routes.ClassRouteCombineSettings csStaticDircsCssPostProcesscsJsPostProcesscsCssPreProcesscsJsPreProcesscsCombinedFolder StaticRouteStaticstatic staticDevelembed staticFilesstaticFilesList publicFiles base64md5combineStylesheets'combineScripts'embeddedResourceRembedStaticContentabsCssUrlsFileProdabsCssUrlsProd absoluteUrlsabsoluteUrlsAtabsoluteUrlsWithbytestring-0.10.4.0Data.ByteString.Lazy.Internal ByteStringmime-types-0.1.0.4 Network.MimeMimeType$fDefaultEntrydata-default-class-0.0.1Data.Default.ClassdefgetRecursiveContentsbaseGHC.IOFilePathhjsmin-0.1.4.7 Text.Jasmineminifym CombineTypeCSSJS notHiddengetFileListPieces mkHashMappathFromRawPiecescachedETagLookupDevelcachedETagLookup mkStaticFilesmkStaticFiles'mkStaticFilesList base64md5Filebase64combineStatics' errorIntro liftRoutes$fDefaultCombineSettings$fYesodSubDispatchStaticm$fParseRouteStaticTFCo:R:RouteStatic$fRenderRouteStaticyesod-core-1.2.17Yesod.Core.Internal.LiteApp LiteAppRouteYesod.Core.TypesWaiSubsiteRouteAddStaticContentYesod.Core.Class.YesodaddStaticContent ComputedEntry cHaskellNamecStEntrycLinkdevEmbed prodEmbeddevelAppstaticContentHelperwidgetSettingsstApp widgetFilesEmbeddedWidgetREmbeddedResourceRmkStrtryExtraDevelFiles$fParseRouteEmbeddedStaticTFCo:R:RouteEmbeddedStatic$fRenderRouteEmbeddedStaticmkRoute($fYesodSubDispatchEmbeddedStaticHandlerT CssGenerationCss UrlReferenceparseUrlsystem-filepath-0.4.12Filesystem.Pathfilename checkForImage loadImages develBgImgB64develExtraFiles cssContentcssStaticLocationcssFileLocationEithUrl checkForUrlparseBackgroundImage parseCssWith parseCssUrlsparseCssFileWithparseCssFileUrls renderCssWithmkCssGenerationcssProductionFiltercssProductionImageFilterparseBackgroundparseDevdevelPassThrough