src/pkginfo

Types

PackageDefect = object of CatchableError

Vars

Package: Pkg

Procs

proc dumpProject(): Pkg {.compileTime, ...raises: [IOError, OSError,
    JsonParsingError, ValueError, Exception],
                          tags: [ReadIOEffect, WriteIOEffect].}
proc getAuthor(pkgInfo: Pkg): string {.compileTime, ...raises: [], tags: [].}
Get package author
proc getDescription(pkgInfo: Pkg): string {.compileTime, ...raises: [], tags: [].}
Get package description
proc getLicense(pkgInfo: Pkg): string {.compileTime, ...raises: [], tags: [].}
Get package license
proc getName(pkgInfo: Pkg): string {.compileTime, ...raises: [], tags: [].}
Get package name
proc getVersion(pkgInfo: Pkg): Version {.compileTime,
    ...raises: [ParseError, ValueError], tags: [].}
Get package version
proc nimVersion(): Version {.compileTime, ...raises: [ParseError, ValueError],
                             tags: [].}
Get Nim version from main working project
proc pkg(pkgName: string = ""): Pkg {.compileTime, ...raises: [KeyError], tags: [].}
proc version(vers: string): Version {.compileTime, ...raises: [ValueError,
    InvalidVersionError], tags: [].}
Create a Version object instance from string

Macros

macro requires(pkgName: string): untyped
Determine if current library has a dependency with given name. This macro works for all direct and indirect dependencies.

Templates

template getDep(pkgName: string): untyped
Retrieve a dependency from current deps
template hasDep(pkgName: string): untyped
Determine if current project requires a package by name