Skip to content

Commit

Permalink
feat: new init cli command
Browse files Browse the repository at this point in the history
  • Loading branch information
tomfrew authored and jonbretman committed Dec 11, 2023
1 parent 10a90c4 commit 22de018
Show file tree
Hide file tree
Showing 10 changed files with 571 additions and 46 deletions.
12 changes: 11 additions & 1 deletion cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"
"strings"

"github.com/manifoldco/promptui"
"github.com/spf13/cobra"
"github.com/teamkeel/keel/colors"
"github.com/teamkeel/keel/node"
Expand All @@ -18,8 +19,17 @@ var generateCmd = &cobra.Command{
RunE: func(cmd *cobra.Command, args []string) error {
logPrefix := colors.Green("|").String()

err := node.Bootstrap(
packageManager, err := resolvePackageManager(flagProjectDir, false)
if err == promptui.ErrAbort {
return nil
}
if err != nil {
panic(err)
}

err = node.Bootstrap(
flagProjectDir,
node.WithPackageManager(packageManager),
node.WithPackagesPath(flagNodePackagesPath),
node.WithLogger(func(s string) {
fmt.Println(logPrefix, s)
Expand Down
Loading

0 comments on commit 22de018

Please sign in to comment.