forked from verless/verless
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroot.go
More file actions
27 lines (23 loc) · 621 Bytes
/
root.go
File metadata and controls
27 lines (23 loc) · 621 Bytes
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
package cli
import (
"github.com/spf13/cobra"
"github.com/verless/verless/config"
)
// NewRootCmd creates the `verless` command and its sub-commands.
func NewRootCmd() *cobra.Command {
rootCmd := cobra.Command{
Use: "verless",
Short: `A simple and lightweight Static Site Generator.`,
Version: config.GitTag,
RunE: func(cmd *cobra.Command, args []string) error {
return cmd.Help()
},
SilenceErrors: true,
SilenceUsage: true,
}
rootCmd.AddCommand(newBuildCmd())
rootCmd.AddCommand(newCreateCmd())
rootCmd.AddCommand(newServeCmd())
rootCmd.AddCommand(newVersionCmd())
return &rootCmd
}