commit
57c1ce568d
@ -1,21 +0,0 @@
|
|||||||
module commands
|
|
||||||
|
|
||||||
import os
|
|
||||||
import cli
|
|
||||||
|
|
||||||
pub fn execute() {
|
|
||||||
mut app := cli.Command{
|
|
||||||
name: 'vss'
|
|
||||||
version: '0.3.0'
|
|
||||||
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)
|
|
||||||
}
|
|
@ -1,7 +1,27 @@
|
|||||||
module main
|
module main
|
||||||
|
|
||||||
|
import os
|
||||||
|
import cli
|
||||||
import commands
|
import commands
|
||||||
|
|
||||||
|
const version = '0.3.0'
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
commands.execute()
|
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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue