Creates new Bau project skeletons.
Types
ProjectInitInfo = object name*: string ## Package and main module name. kind*: string ## Project kind, normalized to `bin` or `lib`. version*: string ## Initial package version. description*: string ## Initial package description. license*: string ## Initial package license. edition*: string ## Bau configuration edition to write.
- User-provided metadata for project scaffolding.
Procs
proc completeProjectInitInfo(partial: ProjectInitInfo; defaultName: string): ProjectInitInfo {. ...raises: [IOError, ValueError], tags: [WriteIOEffect, ReadIOEffect], forbids: [].}
- Fill missing initialization metadata by prompting on stdin.
proc defaultProjectDescription(kind: string): string {....raises: [], tags: [], forbids: [].}
- Return the default package description for a normalized project kind.
proc initNew(path: string; info: ProjectInitInfo; force: bool = false) {. ...raises: [ValueError, OSError, IOError], tags: [WriteDirEffect, ReadDirEffect, WriteIOEffect], forbids: [].}
- Create a new project, creating the parent directory first when needed.
proc initNew(path: string; name: string; kind: string = "bin"; force: bool = false) {....raises: [ValueError, OSError, IOError], tags: [ WriteDirEffect, ReadDirEffect, WriteIOEffect], forbids: [].}
- Create a new project from simple name and kind arguments.
proc initProject(dir: string; info: ProjectInitInfo; force: bool = false) {. ...raises: [ValueError, OSError, IOError], tags: [ReadDirEffect, WriteDirEffect, WriteIOEffect], forbids: [].}
-
Create a Bau project skeleton in dir.
Existing bau.toml files are preserved unless force is true.
proc initProject(dir: string; name: string; kind: string = "bin"; force: bool = false) {....raises: [ValueError, OSError, IOError], tags: [ ReadDirEffect, WriteDirEffect, WriteIOEffect], forbids: [].}
- Create a Bau project skeleton from simple name and kind arguments.
proc initProjectInfo(name: string; kind: string = "bin"): ProjectInitInfo {. ...raises: [ValueError], tags: [], forbids: [].}
- Build default initialization metadata from a name and project kind.
proc normalizeProjectKind(kind: string): string {....raises: [ValueError], tags: [], forbids: [].}
- Normalize user-facing project-kind aliases to bin or lib.