Copyright | (c) 2019-2020 Vaclav Svejcar |
---|---|
License | BSD-3-Clause |
Maintainer | vaclav.svejcar@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Module representing the init
command, responsible for generating all the
required files (configuration, templates) for the given project, which are then
required by the run
or gen
commands.
Synopsis
- data Env = Env {}
- data Paths = Paths {
- pConfigFile :: !FilePath
- pTemplatesDir :: !FilePath
- commandInit :: CommandInitOptions -> IO ()
- doesAppConfigExist :: (HasLogFunc env, Has Paths env) => RIO env Bool
- findSupportedFileTypes :: (Has CommandInitOptions env, HasLogFunc env) => RIO env [FileType]
Documentation
RIO Environment for the init
command.
Env | |
|
Instances
HasLogFunc Env Source # | |
Has CommandInitOptions Env Source # | |
Defined in Headroom.Command.Init getter :: Env -> CommandInitOptions Source # modifier :: (CommandInitOptions -> CommandInitOptions) -> Env -> Env Source # hasLens :: Lens' Env CommandInitOptions Source # viewL :: MonadReader Env m => m CommandInitOptions Source # | |
Has Paths Env Source # | |
Paths to various locations of file system.
Paths | |
|
:: CommandInitOptions |
|
-> IO () | execution result |
Handler for init
command.
doesAppConfigExist :: (HasLogFunc env, Has Paths env) => RIO env Bool Source #
Checks whether application config file already exists.
findSupportedFileTypes :: (Has CommandInitOptions env, HasLogFunc env) => RIO env [FileType] Source #
Recursively scans provided source paths for known file types for which templates can be generated.