import Data.Text (Text)
import Prelude (error)
import Symantic.CLI as CLI
-import System.FilePath ((-<.>))
+import System.FilePath ((-<.>), (</>))
import System.IO (IO, FilePath)
import Text.Show (Show(..))
import qualified Data.ByteString as BS
run_compile_html5 Cfg_Compile_HTML5{..} cfg_compile_input = do
let cfg_compile_output = cfg_compile_input-<.>"html5"
dtc <- run_compile_dtc cfg_compile_input cfg_compile_output
- config_css <- installFile cfg_compile_html5_output_css $ "style" FilePath.</>"dtc-html5.css"
- config_js <- installFile cfg_compile_html5_output_js $ "style" FilePath.</>"dtc-html5.js"
+ config_css <- installFile cfg_compile_html5_output_css $ "src"</>"style"</>"dtc-html5.css"
+ config_js <- installFile cfg_compile_html5_output_js $ "src"</>"style"</>"dtc-html5.js"
let conf = DTC.Config
{ DTC.config_css
, DTC.config_js
where
installFile out name = do
dataDir <- Textphile.getDataDir
- let src = dataDir FilePath.</>name
+ let src = dataDir</>name
case out of
Nothing -> Right <$> FS.readFile src
Just "" -> return $ Left ""
let dir = FilePath.takeDirectory cfg_compile_input in
FS.writeFile (cfg_compile_input-<.>"deps") $
foldMap (TL.pack . (("\n" <>) . FilePath.normalise))
- ((dir FilePath.</>) <$> TCT.dependencies tct) <>
+ ((dir </>) <$> TCT.dependencies tct) <>
"\n"
-- unless (any (\DTC.Link{..} -> link_rel == "stylesheet" && link_url /= URL "") links) $ do
(`foldMap` writer_styles) $ \case
Left css -> do
- content <- FS.readFile =<< Textphile.getDataFileName ("style"</>css)
+ content <- FS.readFile =<< Textphile.getDataFileName ("src"</>"style"</>css)
return $ H.style ! HA.type_ "text/css" $
H.toMarkup content
Right content -> return $ do