2022-08-13 14:44:21 +02:00
|
|
|
module main
|
|
|
|
|
2023-08-07 01:03:23 +02:00
|
|
|
import os
|
|
|
|
import cli
|
2022-08-13 14:44:21 +02:00
|
|
|
import commands
|
|
|
|
|
2023-08-07 01:03:23 +02:00
|
|
|
const version = '0.3.0'
|
|
|
|
|
2022-08-13 14:44:21 +02:00
|
|
|
fn main() {
|
2023-08-07 01:03:23 +02:00
|
|
|
mut app := cli.Command{
|
|
|
|
name: 'vss'
|
|
|
|
version: version
|
|
|
|
description: 'static site generator'
|
|
|
|
execute: fn (cmd cli.Command) ! {
|
|
|
|
println(cmd.help_message())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// add commands
|
|
|
|
app.add_command(commands.new_build_cmd())
|
|
|
|
app.add_command(commands.new_serve_cmd())
|
|
|
|
|
|
|
|
app.setup()
|
|
|
|
|
|
|
|
// run the app
|
|
|
|
app.parse(os.args)
|
2022-08-13 14:44:21 +02:00
|
|
|
}
|