Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains functions to build assets (that is, run preprocessing if necessary, and copy to destination directory).
- buildAsset :: Herringbone -> BuildSpec -> IO (Either AssetError Asset)
- buildAsset' :: Herringbone -> BuildSpec -> IO (Either CompileError Asset)
- shouldCompile :: Herringbone -> UTCTime -> FilePath -> IO Bool
- compileAsset :: Herringbone -> FilePath -> FilePath -> [PP] -> IO (Either CompileError ())
- chainEither :: Monad m => [a -> m (Either b a)] -> a -> m (Either b a)
Documentation
buildAsset :: Herringbone -> BuildSpec -> IO (Either AssetError Asset) Source
Build an asset based on a BuildSpec to produce a Asset
. This action
checks whether the compilation is necessary based on the modified times of
the source and destination files.
buildAsset' :: Herringbone -> BuildSpec -> IO (Either CompileError Asset) Source
shouldCompile :: Herringbone -> UTCTime -> FilePath -> IO Bool Source
Should we compile an asset? True if either the asset doesn't exist, or if its modified time is older than the supplied source modification time.
:: Herringbone | |
-> FilePath | Source path |
-> FilePath | Dest path |
-> [PP] | List of preprocessors to apply |
-> IO (Either CompileError ()) |
Compile the given asset by invoking any preprocessors on the source path, and copying the result to the destination path.
chainEither :: Monad m => [a -> m (Either b a)] -> a -> m (Either b a) Source