Updated Launch code

Added output to error stack, so terminal errors are displayed
Ficed c.Verbose, it was changed to an array which causes issues launching
Removed . notation from doing anything special. This was already replaced with the -p CLI option
Added documentaiton on adding the package name
Started watcher with force refresh.
This commit is contained in:
notzippy@gmail.com
2022-02-28 20:01:01 -08:00
parent ea5acb720f
commit 25dc05b31e
11 changed files with 36 additions and 18 deletions

View File

@@ -19,7 +19,7 @@ import (
)
var cmdNew = &Command{
UsageLine: "new -i [path] -s [skeleton]",
UsageLine: "new -i [path] -s [skeleton] -p [package name]",
Short: "create a skeleton Revel application",
Long: `
New creates a few files to get a new Revel application running quickly.

View File

@@ -133,7 +133,7 @@ func runApp(c *model.CommandConfig) (err error) {
// If the app is run in "watched" mode, use the harness to run it.
if revelPath.Config.BoolDefault("watch", true) && revelPath.Config.BoolDefault("watch.code", true) {
utils.Logger.Info("Running in watched mode.")
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v}`, revelPath.RunMode, c.Verbose)
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v}`, revelPath.RunMode, c.Verbose[0])
if c.HistoricMode {
runMode = revelPath.RunMode
}
@@ -152,7 +152,7 @@ func runApp(c *model.CommandConfig) (err error) {
if len(app.PackagePathMap) > 0 {
paths, _ = json.Marshal(app.PackagePathMap)
}
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v,"packagePathMap":%s}`, app.Paths.RunMode, c.Verbose, string(paths))
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v,"packagePathMap":%s}`, app.Paths.RunMode, c.Verbose[0], string(paths))
if c.HistoricMode {
runMode = revelPath.RunMode
}

View File

@@ -112,7 +112,7 @@ func testApp(c *model.CommandConfig) (err error) {
if len(app.PackagePathMap) > 0 {
paths, _ = json.Marshal(app.PackagePathMap)
}
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v,"packagePathMap":%s}`, app.Paths.RunMode, c.Verbose, string(paths))
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v,"packagePathMap":%s}`, app.Paths.RunMode, c.Verbose[0], string(paths))
if c.HistoricMode {
runMode = app.Paths.RunMode
}