node and browser bindings for gleam

feat(child_process): add `spawn`

Changed files
+16 -1
src
+4
src/child_process_ffi.mjs
··· 1 + import child_process from "node:child_process" 2 + 3 + export const spawn = (cmd, args) => 4 + child_process.spawn(cmd, args.toArray())
+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