Safe Haskell | None |
---|---|
Language | Haskell2010 |
Rob.Project
- getTemplateName :: Template -> String
- getTemplatePath :: Template -> FilePath
- getTemplatePathByName :: [Template] -> String -> FilePath
- projectDataFile :: String
- ignoreFiles :: [FilePath]
- knownIgnoredFiles :: [Pattern]
- hasPathQuestionnaire :: FilePath -> IO Bool
- questionnaireFileByPath :: FilePath -> FilePath
- createFilesFromTemplate :: FilePath -> [(Text, Value)] -> IO ()
- walk :: [Pattern] -> FilePath -> FilePath -> [(Text, Value)] -> IO ()
- populateBlacklist :: FilePath -> IO [Pattern]
- render :: FilePath -> FilePath -> [FilePath] -> [Pattern] -> [(Text, Value)] -> IO ()
- isInBlacklist :: FilePath -> [Pattern] -> Bool
- getIgnoredPatterns :: [FilePath] -> IO [Pattern]
- findIgnoredFilesList :: FilePath -> IO [Pattern]
- removeSeparatorPrefix :: [FilePath] -> [FilePath]
- extendIgnoredFiles :: [FilePath] -> [FilePath]
- isDot :: FilePath -> Bool
- isWildCard :: FilePath -> Bool
- isDoubleWildCard :: FilePath -> Bool
- globbifyList :: [FilePath] -> [Pattern]
Documentation
getTemplateName :: Template -> String Source #
Get only the template name
getTemplatePath :: Template -> FilePath Source #
Get only the template path
projectDataFile :: String Source #
File where users can store all the project creation questions
ignoreFiles :: [FilePath] Source #
knownIgnoredFiles :: [Pattern] Source #
hasPathQuestionnaire :: FilePath -> IO Bool Source #
Check if the path contains the questionnaire file
questionnaireFileByPath :: FilePath -> FilePath Source #
Get the questionnaire file by project path
walk :: [Pattern] -> FilePath -> FilePath -> [(Text, Value)] -> IO () Source #
Walk recursively a folder copying its files using
populateBlacklist :: FilePath -> IO [Pattern] Source #
Add eventually new ignored files to the blacklist map
render :: FilePath -> FilePath -> [FilePath] -> [Pattern] -> [(Text, Value)] -> IO () Source #
Parse a directory copying the files found into the current one | where rob was called, it will also render eventually the answers to the questionnaire | if template token will be found in any of the files
isInBlacklist :: FilePath -> [Pattern] -> Bool Source #
Check whether a path is blacklisted looking it up in the blacklist map | here basically we try to emulate the gitignore behavior recursively
getIgnoredPatterns :: [FilePath] -> IO [Pattern] Source #
Get all the files to ignore uniquelly from a list of known .ignore files
findIgnoredFilesList :: FilePath -> IO [Pattern] Source #
Figure out which files must be ignored reading them from the .gitignore
removeSeparatorPrefix :: [FilePath] -> [FilePath] Source #
Remove the initial separator prefix
extendIgnoredFiles :: [FilePath] -> [FilePath] Source #
Extend the ignored files in order to enhance the patterns matching | for example with the "node_modules*" pattern we will add also "/node_modules" | to the excluded folders
isWildCard :: FilePath -> Bool Source #
isDoubleWildCard :: FilePath -> Bool Source #
globbifyList :: [FilePath] -> [Pattern] Source #
Map a list of file paths to glob patterns