-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Simple projects generator -- -- See README at -- https://github.com/GianlucaGuarini/rob/blob/develop/README.md @package rob @version 0.0.4 module Rob.Logger -- | Print a message highlighting it log' :: Color -> ColorIntensity -> String -> IO () -- | Format the time, showing it into the log message formatTime' :: UTCTime -> String -- | Print a message in the console print' :: String -> IO () -- | Log success messages success :: String -> IO () -- | Log error messages err :: String -> IO () -- | Log info messages info :: String -> IO () -- | Log warning messages warning :: String -> IO () -- | Log a raw message without using colors raw :: String -> IO () -- | Execute log on a list of messages flatten :: Monad m => (a -> m b) -> [a] -> m () module Rob.Package -- | Return the Package version (stored in the .cabal file) version :: String -- | Return the package name name :: String -- | Return the package author author :: String -- | Return the package description description :: String module Rob.Types -- | Task struct listing all the available actions data Task Add :: String -> FilePath -> Task [$sel:name:Add] :: Task -> String [$sel:path:Add] :: Task -> FilePath List :: Task Remove :: Task New :: Task -- | Template name + path data Template Template :: String -> FilePath -> Template -- | Config file struct newtype Config Config :: [Template] -> Config [$sel:templates:Config] :: Config -> [Template] -- | Question struct data Question SimpleQuestion :: String -> String -> Question PasswordQuestion :: String -> Question ConfirmQuestion :: String -> Bool -> Question SelectQuestion :: String -> [String] -> String -> Question MultiselectQuestion :: String -> [String] -> [String] -> Question parseQuestion :: String -> Value -> Parser Question -- | Questionnaiere struct newtype Questionnaire Questionnaire :: HashMap Text Question -> Questionnaire [$sel:questions:Questionnaire] :: Questionnaire -> HashMap Text Question type Blacklist = [(FilePath, [Pattern])] instance GHC.Classes.Eq Rob.Types.Questionnaire instance GHC.Show.Show Rob.Types.Questionnaire instance GHC.Generics.Generic Rob.Types.Questionnaire instance GHC.Classes.Eq Rob.Types.Question instance GHC.Show.Show Rob.Types.Question instance GHC.Classes.Eq Rob.Types.Config instance GHC.Show.Show Rob.Types.Config instance GHC.Generics.Generic Rob.Types.Config instance GHC.Generics.Generic Rob.Types.Template instance GHC.Show.Show Rob.Types.Task instance Data.Data.Data Rob.Types.Task instance Data.Aeson.Types.FromJSON.FromJSON Rob.Types.Questionnaire instance Data.Aeson.Types.FromJSON.FromJSON Rob.Types.Question instance Data.Aeson.Types.FromJSON.FromJSON Rob.Types.Config instance Data.Aeson.Types.ToJSON.ToJSON Rob.Types.Config instance GHC.Show.Show Rob.Types.Template instance GHC.Classes.Eq Rob.Types.Template instance Data.Aeson.Types.FromJSON.FromJSON Rob.Types.Template instance Data.Aeson.Types.ToJSON.ToJSON Rob.Types.Template module Rob.UserMessages choseATemplate :: String choseATemplateToDelete :: String configFileFound :: FilePath -> String noConfigFileFound :: String -> String configFileCreated :: FilePath -> [String] newTaskHelp :: String addTaskHelp :: String listTaskHelp :: String removeTaskHelp :: String noTemplatesAvailable :: String noTemplateSelected :: String tryAddingATemplate :: String unableToParseQuestionnaire :: String projectPathDoesNotExist :: FilePath -> String projectQuestionnaireMissing :: FilePath -> String projectAdded :: String -> String parserError :: String availableTemplates :: String projectSuccessfullyCreated :: String fileCreated :: String -> String emptyString :: String module Rob.Tasks list :: Task -- | New task factory function new :: Task -- | New task factory function remove :: Task -- | Add task factory function add :: Task -- | Export all the command line modes mode :: Mode (CmdArgs Task) module Rob.Project -- | Get only the template name getTemplateName :: Template -> String -- | Get only the template path getTemplatePath :: Template -> FilePath -- | Get the template name by its path getTemplatePathByName :: [Template] -> String -> FilePath -- | File where users can store all the project creation questions projectDataFile :: String ignoreFiles :: [FilePath] knownIgnoredFiles :: [Pattern] -- | Check if the path contains the questionnaire file hasPathQuestionnaire :: FilePath -> IO Bool -- | Get the questionnaire file by project path questionnaireFileByPath :: FilePath -> FilePath -- | Start the template creation createFilesFromTemplate :: FilePath -> [(Text, Value)] -> IO () -- | Walk recursively a folder copying its files using walk :: [Pattern] -> FilePath -> FilePath -> [(Text, Value)] -> IO () -- | Add eventually new ignored files to the blacklist map populateBlacklist :: FilePath -> IO [Pattern] -- | 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 render :: FilePath -> FilePath -> [FilePath] -> [Pattern] -> [(Text, Value)] -> IO () -- | Check whether a path is blacklisted looking it up in the blacklist map -- | here basically we try to emulate the gitignore behavior recursively isInBlacklist :: FilePath -> [Pattern] -> Bool -- | Get all the files to ignore uniquelly from a list of known .ignore -- files getIgnoredPatterns :: [FilePath] -> IO [Pattern] -- | Figure out which files must be ignored reading them from the -- .gitignore findIgnoredFilesList :: FilePath -> IO [Pattern] -- | Remove the initial separator prefix removeSeparatorPrefix :: [FilePath] -> [FilePath] -- | 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 extendIgnoredFiles :: [FilePath] -> [FilePath] -- | Helpers to enhance the ignored files isDot :: FilePath -> Bool isWildCard :: FilePath -> Bool isDoubleWildCard :: FilePath -> Bool -- | Map a list of file paths to glob patterns globbifyList :: [FilePath] -> [Pattern] module Rob.Questionnaire -- | Get only the questions out of a questionnaier data struct as list getQuestions :: Questionnaire -> [(Text, Question)] -- | Run the questionnaire run :: FilePath -> IO [(Text, Value)] mapQuestion :: (Text, Question) -> IO (Text, Value) ask :: Question -> IO Value module Rob.Config -- | Get the config file name configFileName :: String -- | Get the whole path to the config file configFilePath :: IO FilePath -- | Write the config file and return it writeConfig :: Config -> IO Config -- | Read the config file and return it readConfig :: FilePath -> IO Config -- | Get the current Config file Data | If it doesn't exist it will create -- a new one get :: IO Config -- | Dispatch the no templates available error errorNoTemplatesAvailable :: IO () -- | Add a new template to the config object and write it addTemplate :: Config -> String -> String -> IO Config -- | Delete a template from the list of templates deleteTemplate :: Config -> String -> IO Config module Rob.Actions.Remove main :: IO () module Rob.Actions.New main :: IO () module Rob.Actions.List main :: IO () module Rob.Actions.Add main :: String -> FilePath -> IO ()