This commit adds just the subsite itself. The subsite works by running a list of generaters at compile time. The entries produced by the generators are converted into wai-app-static.WaiAppStatic.Storage.Embedded entries. Also, addStaticContent is supported via an IORef. When a widget produces static content (css, javascript), it is stuck into the IORef inside the embedded static subsite. The embedded static subsite will then serve it from the IORef, properly using a 304 response if the client already has the content.
13 lines
259 B
Haskell
13 lines
259 B
Haskell
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
import Test.Hspec
|
|
import YesodStaticTest (specs)
|
|
import EmbedProductionTest (embedProductionSpecs)
|
|
import EmbedDevelTest (embedDevSpecs)
|
|
|
|
main :: IO ()
|
|
main = hspec $ do
|
|
specs
|
|
embedProductionSpecs
|
|
embedDevSpecs
|