This module contains some operations for processing packages, like installing package sources, cleaning packages, rendering package infos.
installPackageSourceTo
:: Package -> PackageSource -> String -> ErrorLogger ()
Installs the source of the package from the given source location
into the subdirectory packageId pkg
of the given directory.
@param pkg - the package specification of the package @param source - the source of the package @param installdir - the directory where the package subdirectory should be installed
cleanPackage
:: Config -> LogLevel -> ErrorLogger ()
Cleans auxiliary files in the local package, i.e., the package containing the current working directory.
renderPackageInfo
:: Bool -> Bool -> Bool -> Package -> String
Renders information about a package.
getLocalPackageSpec
:: Config -> String -> ErrorLogger String
Tries to find a package specification in the given directory or one of its
ancestors. If there is no package specifiction in these directories,
the home package specification (i.e., ~/.cpm/...-homepackage/package.json
is returned (and created if it does not exist).
In order to avoid infinite loops due to cyclic file structures,
the search is limited to the number of directories occurring in the
current absolute path.