
In addition, replace Optional with Result. https://github.com/vlang/v/blob/master/doc/docs.md#optionresult-types-and-error-handling
21 lines
335 B
V
21 lines
335 B
V
module commands
|
|
|
|
import os
|
|
import cli
|
|
|
|
pub fn execute() {
|
|
mut app := cli.Command{
|
|
name: 'vss'
|
|
version: '0.0.12'
|
|
description: 'static site generator'
|
|
execute: fn (cmd cli.Command) ! {
|
|
println(cmd.help_message())
|
|
}
|
|
}
|
|
|
|
app.add_command(new_build_cmd())
|
|
app.add_command(new_serve_cmd())
|
|
|
|
app.setup()
|
|
app.parse(os.args)
|
|
}
|