mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
js,gg: more work on porting gg to JS backend (#12903)
This commit is contained in:
@ -3,6 +3,7 @@ module os
|
||||
$if js_node {
|
||||
#global.$ENV = $process.env
|
||||
} $else {
|
||||
#const global = $global;
|
||||
#global.$ENV = {}
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,9 @@ pub mut:
|
||||
is_opened bool
|
||||
}
|
||||
|
||||
#const $buffer = require('buffer');
|
||||
|
||||
$if !js_browser {
|
||||
#const $buffer = require('buffer');
|
||||
}
|
||||
// todo(playX): __as_cast is broken here
|
||||
/*
|
||||
pub struct ErrFileNotOpened {
|
||||
|
@ -1,8 +1,10 @@
|
||||
module os
|
||||
|
||||
#const $fs = require('fs');
|
||||
#const $path = require('path');
|
||||
#const tty = require('tty')
|
||||
$if js_node {
|
||||
#const $fs = require('fs');
|
||||
#const $path = require('path');
|
||||
#const tty = require('tty')
|
||||
}
|
||||
|
||||
pub const (
|
||||
path_delimiter = '/'
|
||||
|
@ -1,6 +1,8 @@
|
||||
module os
|
||||
|
||||
#const $child_process = require('child_process')
|
||||
$if js_node {
|
||||
#const $child_process = require('child_process')
|
||||
}
|
||||
|
||||
// new_process - create a new process descriptor
|
||||
// NB: new does NOT start the new process.
|
||||
|
Reference in New Issue
Block a user