diff --git a/main.go b/main.go index f0c63cd..19e0256 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,15 @@ import ( "github.com/tockins/realize/realize" ) +const( + name = "Realize" + version = "v1.0" + email = "pracchia@hastega.it" + description = "Run and build your applications on file changes. Watch custom paths and specific extensions. Define additional commands and multiple projects" + author = "Alessio Pracchia" + +) + func main() { handle := func(err error) error{ @@ -17,15 +26,15 @@ func main() { } app := &cli.App{ - Name: "Realize", - Version: "v1.0", + Name: name, + Version: version, Authors: []*cli.Author{ &cli.Author{ - Name: "Alessio Pracchia", - Email: "pracchia@hastega.it", + Name: author, + Email: email, }, }, - Usage: "A sort of Webpack for Go. Run, build and watch file changes with custom paths", + Usage: description, Commands: []*cli.Command{ { Name: "run", @@ -91,13 +100,6 @@ func main() { }, }, }, - //Flags: []cli.Flag { - // &cli.StringFlag{ - // Name: "run", - // Value: "main.go", - // Usage: "main file of your project", - // }, - //}, } app.Run(os.Args) diff --git a/realize/config.go b/realize/config.go index 5436dc2..556b899 100644 --- a/realize/config.go +++ b/realize/config.go @@ -10,6 +10,10 @@ import ( "fmt" ) +const( + file = "realize.config.yaml" +) + type Config struct { file string `yaml:"app_file,omitempty"` Version string `yaml:"version,omitempty"` @@ -34,7 +38,7 @@ type Watcher struct{ // Default value func New(params *cli.Context) *Config{ return &Config{ - file: "realize.config.yaml", + file: file, Version: "1.0", Projects: []Project{ { diff --git a/realize/run.go b/realize/run.go new file mode 100644 index 0000000..4b7b005 --- /dev/null +++ b/realize/run.go @@ -0,0 +1 @@ +package realize