mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v doc
This commit is contained in:
parent
08c1f408d3
commit
9044f1437c
12
v.v
12
v.v
@ -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)
|
||||
|
@ -6,7 +6,7 @@ module compiler
|
||||
|
||||
import os
|
||||
|
||||
const (
|
||||
pub const (
|
||||
v_modules_path = os.home_dir() + '.vmodules'
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user