girlfriend 0.2.0

Girlfriend javascript for shell scripting
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
console.log("Hello", "runjs!");
console.error("Boom!");

const path = "./log.txt";
try {
    const contents = await runjs.readFile(path);
    console.log("Read from a file", contents);
} catch (err) {
    console.error("Unable to read file", path, err);
}

await runjs.writeFile(path, "I can write to a file.");
const contents = await runjs.readFile(path);
console.log("Read from a file", path, "contents:", contents);
console.log("Removing file", path);
runjs.removeFile(path);
console.log("File removed");