shelljs
shelljs copied to clipboard
Having trouble properly implementing ShellJS
G'day guys, I'm so sorry to bother you with such a silly question, I was wondering if anyone could help me out with properly implementing Shelljs into my project, I'm very new to shelljs and a little bit confused on the documentation of how it's implemented, basically all I want to do is allow the Unix find
command and it's configuration from my NodeJS app shown below, to work cross platform with Windows... Instead of it just working on Mac & Linux
exec('find -name "' + "file.txt" + '"', { cwd: randomFolder }, (error, stdout, stderr) => {
var filePath = stdout.substring(stdout.indexOf("./") + 2).trim("\n");
if (error !== null) {
console.Log("Cannot Locate the File...");
console.log();
return;
}
but I don't know how to properly implement shelljs here, can anyone please help me out with how this is done, I've been trying at this for a while now!