initialize

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "init",
	Short: "Initialize a new Flow project",
	Run: func(cmd *cobra.Command, args []string) {
		if !cli.ProjectExists() {
			proj := cli.InitProject()
			proj.Save()

			fmt.Print(
				cli.Green(fmt.Sprintf("Initialized a new Flow project in %s\n\n", cli.DefaultConfigPath)),
			)
			fmt.Printf(
				"Start the Flow Emulator by running: %s\n",
				cli.Bold("flow project start-emulator"),
			)
		} else {
			fmt.Printf(
				"%s\n\nStart the Flow Emulator by running: %s\n",
				cli.Red(fmt.Sprintf("A Flow project already exists in %s", cli.DefaultConfigPath)),
				cli.Bold("flow project start-emulator"),
			)
		}
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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