1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
This commit is contained in:
Alexander Medvednikov 2019-10-30 17:07:41 +03:00
parent 08c1f408d3
commit 9044f1437c
2 changed files with 12 additions and 2 deletions

12
v.v
View File

@ -7,6 +7,7 @@ module main
import (
compiler
benchmark
os
//time
)
@ -62,8 +63,17 @@ fn main() {
}
// Generate the docs and exit
else if 'doc' in commands {
// v.gen_doc_html_for_module(args.last())
vexe := os.executable()
vdir := os.dir(os.executable())
os.chdir(vdir)
mod := args.last()
os.system('$vexe build module vlib/' + args.last())
txt := os.read_file('$compiler.v_modules_path/vlib/${mod}.vh') or {
panic(err)
}
println(txt)
exit(0)
// v.gen_doc_html_for_module(args.last())
} else {
//println('unknown command/argument\n')
//println(compiler.help_text)

View File

@ -6,7 +6,7 @@ module compiler
import os
const (
pub const (
v_modules_path = os.home_dir() + '.vmodules'
)