+4
src/child_process_ffi.mjs
+4
src/child_process_ffi.mjs
+12
-1
src/plinth/node/child_process.gleam
+12
-1
src/plinth/node/child_process.gleam
···
1
+
pub type ChildProcess {
2
+
ChildProcess(kill: fn() -> Nil, stdin: Stdin)
3
+
}
4
+
5
+
pub type Stdin {
6
+
Stdin(write: fn(String) -> Nil)
7
+
}
8
+
1
9
@external(javascript, "child_process", "exec")
2
-
pub fn exec(command: String) -> Nil
10
+
pub fn exec(command: String) -> ChildProcess
11
+
12
+
@external(javascript, "../../child_process_ffi.mjs", "spawn")
13
+
pub fn spawn(command: String, arguments: List(String)) -> ChildProcess