1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

js: codegen & vlib fixes, replace the Game of Life CLI example (#12272)

This commit is contained in:
playX
2021-10-22 22:03:19 +03:00
committed by GitHub
parent 8a4756819a
commit 864d6eae6b
6 changed files with 107 additions and 23 deletions

View File

@ -10,8 +10,10 @@ pub const (
args = []string{}
)
$if js_node {
#$process.argv.forEach(function(val,index) { os__args.arr[index] = new string(val); })
fn init() {
$if js_node {
#$process.argv.forEach(function(val,index) { os__args.arr[index] = new string(val); })
}
}
// real_path returns the full absolute path for fpath, with all relative ../../, symlinks and so on resolved.