1--------------------------------------------------------------------------------
2-- | Exports simple compilers to just copy files
3{-# LANGUAGE DeriveDataTypeable #-}
4{-# LANGUAGE GeneralizedNewtypeDeriving #-}
5module Hakyll.Core.Writable.CopyFile
11--------------------------------------------------------------------------------
12import Control.Applicative ((<$>))
13import Data.Binary (Binary)
14import Data.Typeable (Typeable)
15import System.Directory (copyFile)
18--------------------------------------------------------------------------------
19import Hakyll.Core.Compiler
20import Hakyll.Core.Identifier
21import Hakyll.Core.Writable
24--------------------------------------------------------------------------------
25-- | Newtype construct around 'FilePath' which will copy the file directly
26newtype CopyFile = CopyFile {unCopyFile :: FilePath}
27 deriving (Show, Eq, Ord, Binary, Typeable)
30--------------------------------------------------------------------------------
31instance Writable CopyFile where
32 write dst (CopyFile src) = copyFile src dst
35--------------------------------------------------------------------------------
36copyFileCompiler :: Compiler CopyFile
37copyFileCompiler = CopyFile . toFilePath <$> getIdentifier
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list