feat: add components to init - wip

This commit is contained in:
Allyedge
2022-05-29 20:57:29 +02:00
parent b8dfa6891a
commit 7d84a82a50
5 changed files with 143 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ package cli
import (
"fmt"
"github.com/sern-handler/cli/pkg/components"
"github.com/spf13/cobra"
)
@@ -11,6 +12,10 @@ var initCmd = &cobra.Command{
Short: "Initialize a new Sern project.",
Long: `Initialize a new Sern project, either with a JavaScript or a TypeScript template.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Sern CLI - Init")
projectName := components.NewInput("What is your project's name?", "example-project")
language := components.NewSelection("What language do you want to use?", []string{"JavaScript", "TypeScript"})
fmt.Println(projectName + " " + language)
},
}