project

package
v0.2.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProjectDir

func GetProjectDir() (string, error)

GetProjectDir returns the project's root dir. It finds it by looking for the jen.yaml file in current working dir and then walking up the directory structure until it reaches the volume's root dir. If it doesn't find it, it returns an empty string.

Types

type Project

type Project struct {
	Version       string
	TemplateName  string
	Vars          map[string]interface{}
	Dir           string   `yaml:"-"`
	OverridenVars []string `yaml:"-"`
}

Project represents the configuration file in a project's root dir

func Load

func Load(dir string) (*Project, error)

Load loads the project file from given project directory

func LoadOrCreate

func LoadOrCreate(templateName string, skipConfirm bool, varOverrides []string) (*Project, error)

LoadOrCreate loads current project file and, if it doesn't exists, prompts user whether to create it.

func (Project) GetTemplateDir

func (p Project) GetTemplateDir() (string, error)

GetTemplateDir returns the path to this project's template

func (Project) Save

func (p Project) Save() error

Save saves project file into given project directory

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL