Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type CompiledContent = MaybeT Action
- type FileProcessor = [File] -> CompiledContent [File]
- type StringProcessor = String -> CompiledContent String
- makePattern :: FilePath -> String -> FilePath
- makeValidPattern :: FilePath -> String -> Action [FilePath]
- makeFilePatterns :: [FilePath] -> [String] -> Action [FilePattern]
- getDirectoryFilesInOrder :: FilePath -> String -> [FilePattern] -> Action [FilePath]
- compile :: BuildConfig -> FilePath -> [String] -> [FilePath] -> FileProcessor -> StringProcessor -> CompiledContent String
- expandPaths :: FilePath -> String -> [FilePath] -> [FilePath] -> Action [FilePath]
- createPathDirectories :: [FilePath] -> Action ()
- createIntermediaryDirectories :: String -> Action ()
- expandDeps :: [String] -> (String -> [FilePath]) -> [FilePath]
- getDirectoryFiles :: FilePath -> [FilePattern] -> Action [FilePath]
- errorPrintSetter :: IO ()
- headerPrintSetter :: IO ()
- successPrintSetter :: IO ()
- logStatus :: IO () -> String -> IO ()
- createStdEnv :: MonadIO m => BuildConfig -> m CmdOption
Documentation
type CompiledContent = MaybeT Action Source
type FileProcessor = [File] -> CompiledContent [File] Source
type StringProcessor = String -> CompiledContent String Source
makePattern :: FilePath -> String -> FilePath Source
Construct a file pattern by providing a base directory and an extension.
makeValidPattern :: FilePath -> String -> Action [FilePath] Source
Construct and return the given base directory and extension whose base directory exists.
makeFilePatterns :: [FilePath] -> [String] -> Action [FilePattern] Source
Splice a list of base directories and their corresponding extensions for a list of file patterns.
getDirectoryFilesInOrder :: FilePath -> String -> [FilePattern] -> Action [FilePath] Source
Given a working directory and a list of patterns, expand all the paths, in order.
compile :: BuildConfig -> FilePath -> [String] -> [FilePath] -> FileProcessor -> StringProcessor -> CompiledContent String Source
Given the path to a compiler, parameters to the compiler, a list of paths of to-be-compiled files, the output file path, and a processing function, do the following:
- reads all the to-be-compiled files
- calls the processor with the list of files to perform any pre-processing
- concatenates all files
- passes the concatenated string to the compiler
- returns the compiled content
expandPaths :: FilePath -> String -> [FilePath] -> [FilePath] -> Action [FilePath] Source
Given a list of static and a list of dynamic paths, return a list of all paths, resolved to absolute paths.
createPathDirectories :: [FilePath] -> Action () Source
Given a list of paths, make sure all intermediary directories are there.
createIntermediaryDirectories :: String -> Action () Source
Create all the directories within a path if they do not exist. Note that the last segment is assumed to be the file and therefore not created.
expandDeps :: [String] -> (String -> [FilePath]) -> [FilePath] Source
Return a list of dynamic paths given a list of dependency ID and a function to expand one ID into a list of paths.
getDirectoryFiles :: FilePath -> [FilePattern] -> Action [FilePath] Source
Shake hangs when the path given to getDirectoryFiles
doesn't exist.
This is a safe version of that.
errorPrintSetter :: IO () Source
Error printer: white text over red background.
headerPrintSetter :: IO () Source
Header printer: blue text
successPrintSetter :: IO () Source
Success printer: white text over green background
logStatus :: IO () -> String -> IO () Source
Log a message with a provided print configuration setter.
createStdEnv :: MonadIO m => BuildConfig -> m CmdOption Source
Put together common (i.e. standard) environment variables.