bin build option
This commit is contained in:
parent
50f25fdb06
commit
524e328ff7
|
@ -29,6 +29,7 @@ type Config struct {
|
||||||
type Project struct {
|
type Project struct {
|
||||||
Name string `yaml:"app_name,omitempty"`
|
Name string `yaml:"app_name,omitempty"`
|
||||||
Run bool `yaml:"app_run,omitempty"`
|
Run bool `yaml:"app_run,omitempty"`
|
||||||
|
Bin bool `yaml:"app_bin,omitempty"`
|
||||||
Build bool `yaml:"app_build,omitempty"`
|
Build bool `yaml:"app_build,omitempty"`
|
||||||
Main string `yaml:"app_main,omitempty"`
|
Main string `yaml:"app_main,omitempty"`
|
||||||
Watcher Watcher `yaml:"app_watcher,omitempty"`
|
Watcher Watcher `yaml:"app_watcher,omitempty"`
|
||||||
|
@ -54,6 +55,7 @@ func New(params *cli.Context) *Config{
|
||||||
Main: params.String("main"),
|
Main: params.String("main"),
|
||||||
Run: params.Bool("run"),
|
Run: params.Bool("run"),
|
||||||
Build: params.Bool("build"),
|
Build: params.Bool("build"),
|
||||||
|
Bin: params.Bool("bin"),
|
||||||
Watcher: Watcher{
|
Watcher: Watcher{
|
||||||
Paths: []string{ext},
|
Paths: []string{ext},
|
||||||
Exts: []string{path},
|
Exts: []string{path},
|
||||||
|
|
|
@ -12,6 +12,7 @@ func (h *Config) Watch() error{
|
||||||
if err != nil{
|
if err != nil{
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
defer watcher.Close()
|
||||||
|
|
||||||
walking := func(path string, info os.FileInfo, err error) error{
|
walking := func(path string, info os.FileInfo, err error) error{
|
||||||
if info.IsDir() {
|
if info.IsDir() {
|
||||||
|
|
Loading…
Reference in New Issue