diff --git a/yesod-default/Yesod/Default/Util.hs b/yesod-default/Yesod/Default/Util.hs index fa21a8b3..1e3a5418 100644 --- a/yesod-default/Yesod/Default/Util.hs +++ b/yesod-default/Yesod/Default/Util.hs @@ -52,24 +52,24 @@ addStaticContentExternal minify hash staticDir toRoute ext' _ content = do | ext' == "js" = either (const content) id $ minify content | otherwise = content --- | expects a root folder for each type, e.g: hamlet/ lucius/ julius/ +-- | expects a file extension for each type, e.g: hamlet lucius julius globFile :: String -> String -> FilePath -globFile kind x = kind ++ "/" ++ x ++ "." ++ kind +globFile kind x = "templates/" ++ x ++ "." ++ kind widgetFileProduction :: FilePath -> Q Exp widgetFileProduction x = do - let h = whenExists x "templates" whamletFile - let c = whenExists x "templates" cassiusFile - let j = whenExists x "templates" juliusFile - let l = whenExists x "templates" luciusFile + let h = whenExists x "hamlet" whamletFile + let c = whenExists x "cassius" cassiusFile + let j = whenExists x "julius" juliusFile + let l = whenExists x "lucius" luciusFile [|$h >> addCassius $c >> addJulius $j >> addLucius $l|] widgetFileDebug :: FilePath -> Q Exp widgetFileDebug x = do - let h = whenExists x "templates" whamletFile - let c = whenExists x "templates" cassiusFileDebug - let j = whenExists x "templates" juliusFileDebug - let l = whenExists x "templates" luciusFileDebug + let h = whenExists x "hamlet" whamletFile + let c = whenExists x "cassius" cassiusFileDebug + let j = whenExists x "julius" juliusFileDebug + let l = whenExists x "lucius" luciusFileDebug [|$h >> addCassius $c >> addJulius $j >> addLucius $l|] whenExists :: String -> String -> (FilePath -> Q Exp) -> Q Exp diff --git a/yesod/Build.hs b/yesod/Build.hs index f0b68ad4..51ff311c 100644 --- a/yesod/Build.hs +++ b/yesod/Build.hs @@ -125,7 +125,7 @@ determineHamletDeps x = do A.Fail{} -> return [] A.Done _ r -> mapM go r >>= filterM doesFileExist . concat where - go (Just (Hamlet, f)) = return [f, "hamlet/" ++ f ++ ".hamlet"] + go (Just (Hamlet, f)) = return [f, "templates/" ++ f ++ ".hamlet"] go (Just (Verbatim, f)) = return [f] go (Just (Messages f, _)) = return [f] go (Just (StaticFiles fp, _)) = getFolderContents fp