rob-0.0.2: Simple projects generator

Safe HaskellNone
LanguageHaskell2010

Rob.Project

Synopsis

Documentation

getTemplateName :: Template -> String Source #

Get only the template name

getTemplatePath :: Template -> FilePath Source #

Get only the template path

getTemplatePathByName :: [Template] -> String -> FilePath Source #

Get the template name by its path

projectDataFile :: String Source #

File where users can store all the project creation questions

hasPathQuestionnaire :: FilePath -> IO Bool Source #

Check if the path contains the questionnaire file

questionnaireFileByPath :: FilePath -> FilePath Source #

Get the questionnaire file by project path

createFilesFromTemplate :: FilePath -> [(Text, Value)] -> IO () Source #

Start the template creation

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

isDot :: FilePath -> Bool Source #

Helpers to enhance the ignored files

globbifyList :: [FilePath] -> [Pattern] Source #

Map a list of file paths to glob patterns