1-- | Exports simple compilers to just copy files
3{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable #-}
4module Hakyll.Core.Writable.CopyFile
9import Control.Arrow ((>>^))
10import System.Directory (copyFile)
12import Data.Typeable (Typeable)
13import Data.Binary (Binary)
15import Hakyll.Core.ResourceProvider
16import Hakyll.Core.Writable
17import Hakyll.Core.Compiler
18import Hakyll.Core.Identifier
20-- | Newtype construct around 'FilePath' which will copy the file directly
22newtype CopyFile = CopyFile {unCopyFile :: FilePath}
23 deriving (Show, Eq, Ord, Binary, Typeable)
25instance Writable CopyFile where
26 write dst (CopyFile src) = copyFile src dst
28copyFileCompiler :: Compiler Resource CopyFile
29copyFileCompiler = getIdentifier >>^ CopyFile . toFilePath
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