diff --git a/commands/serve.v b/commands/serve.v index 31ae6f5..35efb55 100644 --- a/commands/serve.v +++ b/commands/serve.v @@ -87,8 +87,12 @@ fn watch(path string, mut logger log.Log) { watchers << w } + ignore := "." + os.path_separator + "dist" for { for mut w in watchers { + if w.path.starts_with(ignore) { + continue + } now := os.file_last_mod_unix(w.path) if now > w.time_stamp { println('modified file: $w.path') @@ -112,7 +116,7 @@ fn serve(mut logger log.Log) ? { port: commands.cport } println('http://localhost:$commands.cport') - w := go watch('dist', mut logger) + w := go watch('.', mut logger) server.listen_and_serve() or { panic(err) } w.wait() diff --git a/commands/vss.v b/commands/vss.v index 90c47aa..1491502 100644 --- a/commands/vss.v +++ b/commands/vss.v @@ -6,7 +6,7 @@ import cli pub fn execute() { mut app := cli.Command{ name: 'vss' - version: '0.0.10' + version: '0.0.11' description: 'static site generator' execute: fn (cmd cli.Command) ? { println(cmd.help_message())