large changes

This commit is contained in:
2025-12-26 10:06:23 -05:00
parent 9d7dbc31ca
commit e4eb7d62e4
15 changed files with 119 additions and 90 deletions

24
main.go
View File

@@ -9,15 +9,15 @@ import (
"github.com/fatih/color"
"fes/src/config"
"fes/src/doc"
"fes/src/new"
"fes/src/server"
"fes/src/version"
"fes/modules/config"
"fes/modules/doc"
"fes/modules/new"
"fes/modules/server"
"fes/modules/version"
)
//go:embed core/*
var core embed.FS
//go:embed lib/*
var lib embed.FS
//go:embed index.html
var documentation string
@@ -25,7 +25,8 @@ var documentation string
func init() {
config.Port = flag.Int("p", 3000, "Set the server port")
config.Color = flag.Bool("no-color", false, "Disable color output")
config.Core = core
config.Static = flag.Bool("static", false, "Render and save all pages.")
config.Lib = lib
config.Doc = documentation
}
@@ -38,15 +39,22 @@ func main() {
fmt.Println(" run <project_dir> Start the server")
fmt.Println("Options:")
flag.PrintDefaults()
fmt.Println("For bug reports, contact a developer and describe the issue. Provide the output of the `-V1` flag.")
}
showVersion := flag.Bool("version", false, "Show version and exit")
showFullVersion := flag.Bool("V1", false, "Show extended version information and exit")
flag.Parse()
if *showVersion {
version.Version()
}
if *showFullVersion {
version.FullVersion()
}
if *config.Color {
color.NoColor = true
}