-
-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathinit.go
More file actions
28 lines (23 loc) · 1 KB
/
init.go
File metadata and controls
28 lines (23 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var initCmd = &cobra.Command{
Use: "init",
Short: "Create a package.json file",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(initCmd).Standalone()
initCmd.Flags().BoolP("help", "h", false, "Output usage information")
initCmd.Flags().String("name", "", "Set the name field in package.json")
initCmd.Flags().String("version", "", "Set the version field in package.json")
initCmd.Flags().String("description", "", "Set the description field in package.json")
initCmd.Flags().String("author", "", "Set the author field in package.json")
initCmd.Flags().String("license", "", "Set the license field in package.json")
initCmd.Flags().String("homepage", "", "Set the homepage field in package.json")
initCmd.Flags().String("repository", "", "Set the repository field in package.json")
initCmd.Flags().String("keywords", "", "Set the keywords field in package.json")
rootCmd.AddCommand(initCmd)
}