mirror of
				https://github.com/beego/bee.git
				synced 2025-11-04 04:13:26 +00:00 
			
		
		
		
	Add support for watch main package files through bee.json
This commit is contained in:
		
							
								
								
									
										8
									
								
								bee.json
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								bee.json
									
									
									
									
									
								
							@@ -1,5 +1,9 @@
 | 
			
		||||
{
 | 
			
		||||
	"dir_structure":{
 | 
			
		||||
		"controllers": "routers"
 | 
			
		||||
	}
 | 
			
		||||
		"controllers": "",
 | 
			
		||||
		"models": ""
 | 
			
		||||
	},
 | 
			
		||||
	"files": [
 | 
			
		||||
		"main.go"
 | 
			
		||||
	]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										2
									
								
								run.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								run.go
									
									
									
									
									
								
							@@ -40,6 +40,7 @@ var conf struct {
 | 
			
		||||
		Controllers string
 | 
			
		||||
		Models      string
 | 
			
		||||
	} `json:"dir_structure"`
 | 
			
		||||
	Files []string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func runApp(cmd *Command, args []string) {
 | 
			
		||||
@@ -58,6 +59,7 @@ func runApp(cmd *Command, args []string) {
 | 
			
		||||
	paths = append(paths,
 | 
			
		||||
		path.Join(crupath, conf.DirStruct.Controllers),
 | 
			
		||||
		path.Join(crupath, conf.DirStruct.Models))
 | 
			
		||||
	paths = append(paths, conf.Files...)
 | 
			
		||||
 | 
			
		||||
	NewWatcher(paths)
 | 
			
		||||
	appname = args[0]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user